[Python-ideas] keyword arguments everywhere (stdlib) - issue8706

Serhiy Storchaka storchaka at gmail.com
Sun Mar 4 23:03:41 CET 2012


04.03.12 22:59, Terry Reedy написав(ла):
> The pos(n) idea does not work because position-only args may still have
> defaults. For instance, range() takes 1 to 3 args. That proposal did
> give me this idea: tag positional names with their index. In a sense,
> the index *is* the internal name while apparent alphabetic name is
> suggestive for human understanding.
>
> For doc purposes, the tag could be either a prefix or suffix. Either
> way, it would be a convention that does not conflict with any stdlib
> names that I know of.

Extend this for function arguments:
"""
However, there is a convention that is followed by most Python code: a 
name prefixed with an underscore (e.g. _spam) should be treated as a 
non-public part of the API (whether it is a function, a method or a data 
member). It should be considered an implementation detail and subject to 
change without notice.
"""




More information about the Python-ideas mailing list