- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | serhiy.storchaka |
|---|---|
| Recipients | barry, mark.dickinson, serhiy.storchaka |
| Date | 2020-05-27.07:57:47 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> |
| In-reply-to |
| Content |
|---|
Currently PyNumber_Index() can return something that's an instance of a strict subclass of int. For example PyNumber_Index(Py_True) returns Py_True. The same for operator.index(): >>> import operator >>> operator.index(True) True The proposed PR makes it always return an int. To avoid possible overhead for creating temporary integer object, added private function _PyNumber_Index() with the past behavior. It can be used for short-living integer objects which for which only its value will be used, but not its methods. For example in the implementation of PyLong_AsLong() and similar functions. See also issue17576. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-05-27 07:57:47 | serhiy.storchaka | set | recipients: + serhiy.storchaka, barry, mark.dickinson |
| 2020-05-27 07:57:47 | serhiy.storchaka | set | messageid: <1590566267.28.0.18988326269.issue40792@roundup.psfhosted.org> |
| 2020-05-27 07:57:47 | serhiy.storchaka | link | issue40792 messages |
| 2020-05-27 07:57:47 | serhiy.storchaka | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
