[Python-Dev] PEP 457: Syntax For Positional-Only Parameters
Larry Hastings
larry at hastings.org
Wed Oct 9 17:09:26 CEST 2013
On 10/09/2013 04:45 PM, Anders J. Munch wrote:
>
> Larry Hastings wrote:
>
> > I look forward to an alternate suggestion. This is the least-bad
>
> > thing I could come up with.
>
> How about a naming convention instead, where using a leading
>
> underscore in a parameter name is a hint that it is positional-only.
>
> For example, the docstring of sorted:
>
> sorted(iterable, key=None, reverse=False) --> new sorted list
>
> would become:
>
> sorted(_iterable, key=None, reverse=False) --> new sorted list
>
> It seems more intuitive than the slash, and requires no change to the
>
> toolchain.
>
And the spelling for range()? curses.window.addch()? I suggest your
proposed syntax is insufficient to codify existing practice.
In any case, boy am I -1 on this. If you wish to continue this proposal
further please write your own PEP.
//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131009/b6ff7627/attachment-0001.html>
More information about the Python-Dev
mailing list