-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restify PEP 303 #142
Restify PEP 303 #142
Conversation
Prep the file for conversion by restify script Add colon where necessary
Output from restify script
Some manual adjustments
|
||
The built-in ``divmod()`` function would be changed to accept multiple | ||
divisors, changing its signature from ``divmod(dividend, divisor)`` to | ||
divmod(dividend, \*divisors). The dividend is divided by the last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``divmod(dividend, *divisors)``
check its second argument for being a sequence is deemed to be too | ||
ugly to contemplate. And in the case where one *does* have a | ||
sequence that is computed other-where, it is easy enough to write | ||
divmod(x, \*divs) instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``divmod(x, *divs)``
new implementation of the function builtin_divmod() in | ||
Python/bltinmodule.c | ||
Not finished yet, but it seems a rather straightforward | ||
new implementation of the function builtin_divmod() in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``builtin_divmod()``
Python/bltinmodule.c | ||
Not finished yet, but it seems a rather straightforward | ||
new implementation of the function builtin_divmod() in | ||
Python/bltinmodule.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``Python/bltinmodule.c``. (notice the missing full stop)
Thanks, @berkerpeksag :) I addressed your comments. |
that the target tuple is of the right length. Users from other | ||
languages are more likely to understand the standard two argument | ||
form without having to re-read the documentation. See python-dev | ||
discussion on 17 June 2005. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct discussion thread? https://mail.python.org/pipermail/python-dev/2005-June/054283.html
Should it be linked from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it is, nice detective work :) Yes, it would be nice to add a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) I added the link to it.
Thanks! |
Mostly converted via a script but there were manual adjustments :)
Let me know what you think about this.