Skip to content
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

Merged
merged 5 commits into from
Nov 28, 2016
Merged

Restify PEP 303 #142

merged 5 commits into from
Nov 28, 2016

Conversation

Mariatta
Copy link
Member

Mostly converted via a script but there were manual adjustments :)

Let me know what you think about this.

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
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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)

@Mariatta
Copy link
Member Author

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.
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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.

@berkerpeksag berkerpeksag merged commit 84de20b into python:master Nov 28, 2016
@berkerpeksag
Copy link
Member

Thanks!

@Mariatta Mariatta deleted the restify-pep303 branch March 2, 2017 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants