Skip to content

Remove several special method of complex class#3555

Merged
youknowone merged 2 commits into
RustPython:mainfrom
Snowapril:remove_complex_methods
Feb 18, 2022
Merged

Remove several special method of complex class#3555
youknowone merged 2 commits into
RustPython:mainfrom
Snowapril:remove_complex_methods

Conversation

@Snowapril

@Snowapril Snowapril commented Feb 18, 2022

Copy link
Copy Markdown
Contributor

This revision removes below special method from complex class

  • __int__
  • __float__
  • __floordiv__
  • __mod__
  • __divmod__
  • __rfloordiv__
  • __rmod__
  • __rdivmod__

According to Cpython 3.10 changes, these special methods of complex class are removed as they always raise TypeError.
reference : https://bugs.python.org/issue41974

According to Cpython 3.10 changes, some special methods of complex class
(`__int__`, `__float__`, etc) are removed as they always raise `TypeError`.
(reference : https://bugs.python.org/issue41974)
@Snowapril

Snowapril commented Feb 18, 2022

Copy link
Copy Markdown
Contributor Author

Oh I should have removed related test cases. I'll applying it later
Done

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@youknowone youknowone merged commit ccb2434 into RustPython:main Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants