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?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2020-10-09.11:15:51.586>
created_at = <Date 2020-10-08.06:55:25.118>
labels = ['interpreter-core', 'type-feature', '3.10']
title = 'Remove complex.__float__, complex.__floordiv__, etc'
updated_at = <Date 2021-04-10.22:36:47.138>
user = 'https://github.com/serhiy-storchaka'
activity = <Date 2021-04-10.22:36:47.138>
actor = 'gvanrossum'
assignee = 'none'
closed = True
closed_date = <Date 2020-10-09.11:15:51.586>
closer = 'serhiy.storchaka'
components = ['Interpreter Core']
creation = <Date 2020-10-08.06:55:25.118>
creator = 'serhiy.storchaka'
dependencies = 
files = 
hgrepos = 
issue_num = 41974
keywords = ['patch']
message_count = 7.0
messages = ['378218', '378307', '378315', '390211', '390219', '390249', '390752']
nosy_count = 7.0
nosy_names = ['lemburg', 'gvanrossum', 'rhettinger', 'mark.dickinson', 'stutzbach', 'serhiy.storchaka', 'DevilXD']
pr_nums = ['22593', '25197']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue41974'
versions = ['Python 3.10']
The text was updated successfully, but these errors were encountered:
The complex class has special methods which always raise a TypeError:
After removing them the corresponding operations (converting to int and float, operators // and %, function divmod()) will still a TypeError.
Advantages of removing:
Sorry, something went wrong.
+1 This makes sense.
New changeset e2ec0b2 by Serhiy Storchaka in branch 'master':
bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593)
The docs for this should probably be updated to reflect the change: https://docs.python.org/3/library/typing.html#typing.runtime_checkable
Indeed, Bartosz. Do you think you can help by submitting a PR for the docs?
Done so: #25197
Signed the CLA thing too, it seems it'll take a while to update tho.
New changeset ac05f82 by DevilXD in branch 'master':
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
No branches or pull requests