[Python-Dev] PEP 457: Syntax For Positional-Only Parameters (original) (raw)
Terry Reedy tjreedy at udel.edu
Wed Oct 9 18:48:49 CEST 2013
- Previous message: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters
- Next message: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/9/2013 9:51 AM, Larry Hastings wrote:
Again, I don't expect this syntax to be implemented any time soon. But this does raise a mild sore point: Maciej and Armin Rigo tell me that PyPy's implementation of range() looks like this:
def range(x, y=None, step=None): The "None" above is not the Python None, it's RPython's internal None, so it's not available to Python programs. But this does mean range() in PyPy accepts keyword parameters, and in fact this works: range(9, step=2) That's way illegal in CPython.
But Georg's point is that it does not have to be illegal in CPython. Range, in particular, does not have to be blazingly fast since it wraps loops rather than being in loops. I quite agree that it would be better to fix most functions.
-- Terry Jan Reedy
- Previous message: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters
- Next message: [Python-Dev] PEP 457: Syntax For Positional-Only Parameters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]