The Wayback Machine - https://web.archive.org/web/20220508061346/https://github.com/RustPython/RustPython/issues/3687
Skip to content
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

int.real returns self for int type without subclassing #3687

Open
youknowone opened this issue May 3, 2022 · 0 comments
Open

int.real returns self for int type without subclassing #3687

youknowone opened this issue May 3, 2022 · 0 comments
Labels
A-stdlib compat good first issue

Comments

@youknowone
Copy link

@youknowone youknowone commented May 3, 2022

when a is int,

assert a.real is a

when a is subclass of int,

assert a.real is not a
assert type(a.real) is int
@youknowone youknowone added good first issue compat A-stdlib labels May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stdlib compat good first issue
Projects
None yet
Development

No branches or pull requests

1 participant