- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Issue41974
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.
Created on 2020-10-08 06:55 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 22593 | merged | serhiy.storchaka, 2020-10-08 07:00 | |
| PR 25197 | merged | DevilXD, 2021-04-05 18:14 | |
| Messages (7) | |||
|---|---|---|---|
| msg378218 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2020-10-08 06:55 | |
The complex class has special methods which always raise a TypeError: __int__ __float__ __floordiv__ __mod__ __divmod__ After removing them the corresponding operations (converting to int and float, operators // and %, function divmod()) will still a TypeError. Advantages of removing: * Less code to maintain. * More uniform error messages. * Clearer output of help(). * Possibility to implement a type with __rfloordiv__, __rmod__ and __rdivmod__ which support complex numbers. |
|||
| msg378307 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2020-10-09 08:12 | |
+1 This makes sense. |
|||
| msg378315 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2020-10-09 11:14 | |
New changeset e2ec0b27c02a158d0007c11dcc1f2d7a95948712 by Serhiy Storchaka in branch 'master': bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593) https://github.com/python/cpython/commit/e2ec0b27c02a158d0007c11dcc1f2d7a95948712 |
|||
| msg390211 - (view) | Author: Bartosz (DevilXD) * | Date: 2021-04-04 20:39 | |
The docs for this should probably be updated to reflect the change: https://docs.python.org/3/library/typing.html#typing.runtime_checkable |
|||
| msg390219 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2021-04-05 03:12 | |
Indeed, Bartosz. Do you think you can help by submitting a PR for the docs? |
|||
| msg390249 - (view) | Author: Bartosz (DevilXD) * | Date: 2021-04-05 18:53 | |
Done so: https://github.com/python/cpython/pull/25197 Signed the CLA thing too, it seems it'll take a while to update tho. |
|||
| msg390752 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2021-04-10 22:36 | |
New changeset ac05f82ad4983e3d3653ae7494c1ff62c4a265fc by DevilXD in branch 'master': bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197) https://github.com/python/cpython/commit/ac05f82ad4983e3d3653ae7494c1ff62c4a265fc |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:36 | admin | set | github: 86140 |
| 2021-04-10 22:36:47 | gvanrossum | set | messages: + msg390752 |
| 2021-04-05 18:53:54 | DevilXD | set | messages: + msg390249 |
| 2021-04-05 18:14:11 | DevilXD | set | pull_requests: + pull_request23936 |
| 2021-04-05 03:12:44 | gvanrossum | set | messages: + msg390219 |
| 2021-04-04 20:39:47 | DevilXD | set | nosy:
+ DevilXD messages: + msg390211 |
| 2020-10-09 11:15:51 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2020-10-09 11:14:49 | serhiy.storchaka | set | messages: + msg378315 |
| 2020-10-09 08:12:47 | rhettinger | set | messages: + msg378307 |
| 2020-10-08 07:01:00 | serhiy.storchaka | set | nosy:
+ lemburg, rhettinger, mark.dickinson, stutzbach |
| 2020-10-08 07:00:03 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request21582 |
| 2020-10-08 06:55:25 | serhiy.storchaka | create | |


