On 06.01.2014 22:34, Larry Hastings wrote: > > p.s. > > For what it's worth, the documentation for match() dodges this problem by > outright lying. It claims > that the prototype for the function is: > > match(string[, pos[, endpos]]) > > which is a lie. pattern_match() parses its arguments by calling > PyArg_ParseTupleAndKeywords() with > a format string of "O|nn". Which means, for example, you could call: > > match("abc", endpos=5) > > The documentation suggests this is invalid but it works fine. So my feeling > is, this is a > legitimate problem, and those who came before me swept it under the rug.
Looks like a documentation bug to me. Several functions were changed to be keyword aware some years ago and the docs you quoted still list the old positional format. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 06 2014) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________________ python-committers mailing list python-committers@python.org https://mail.python.org/mailman/listinfo/python-committers