-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-79888: support __index__ and __float__ in time functions #11636
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
base: main
Are you sure you want to change the base?
Conversation
CC @abalkin as suggested by https://devguide.python.org/experts/ |
CC @pganssle |
Good point, we could check that it takes at least 0.9 seconds to execute that. |
There are already various tests for sleep time, so I'll base myself on those. |
This is a bugfix (this used to work correctly before bpo-22117, in particular on Python 2.7), so should be backported. |
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.
This has merge conflicts now.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
The following commit authors need to sign the Contributor License Agreement: |
https://bugs.python.org/issue35707
Note that there is substantial code duplication in my patch, but that is only because the existing code already had substantial duplication. It would be possible to fix that, at the expense of a slightly more complicated (and therefore probably slightly slower) implementation.