This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, eric.araujo, eric.smith, georg.brandl, l0nwlf, loewis, lukasz.langa, pitrou, rhettinger, schof, terry.reedy, twhitema
Date 2011-01-02.02:22:54
SpamBayes Score 2.7755576e-15
Marked as misclassified No
Message-id <1293934976.62.0.544219256812.issue8350@psf.upfronthosting.co.za>
In-reply-to
Content
If there is no indication in the lib manual as to which parameter names and defaults are real and which are fake, then the safe guideline is to never use keywards for library functions and methods and always pass everything positionally.

Slightly more complicated is to be aware of which classes and modules are Python versus C coded. (If needed, change for module.py in /Lib.) For some modules, one can take a cue from doc examples that use keywords.

Otherwise, each person has to experiment for himself and  check each TypeError messages to determine whether it arises from a misspelling or a hidden limitation. And maybe go through the same process a year later after forgetting.

>"We've lived without this spec for almost twenty years,"
Yes, and people have been stumbling on this and complaining for probably just as long. Since []s are no longer used in the doc to indicate 'optional', they can and are being used to indicate 'position-only'. Specify in the introduction, where notation should be explained, that the limitation is only for current CPython and may be changed in the future or be different for other implementations. However....

In my opinion, the real solution is to remove the limitation. Since the language spec says args can be passed by keyword as well as by position, make it be that way for everything we distribute.
History
Date User Action Args
2011-01-02 02:22:56terry.reedysetrecipients: + terry.reedy, loewis, georg.brandl, rhettinger, pitrou, eric.smith, eric.araujo, twhitema, schof, l0nwlf, docs@python, lukasz.langa
2011-01-02 02:22:56terry.reedysetmessageid: <1293934976.62.0.544219256812.issue8350@psf.upfronthosting.co.za>
2011-01-02 02:22:55terry.reedylinkissue8350 messages
2011-01-02 02:22:54terry.reedycreate