-
Notifications
You must be signed in to change notification settings - Fork 1.3k
BuiltinFunctionType
and BuiltinMethodType
are different
#3100
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
Comments
Note: I think must be equal is a bit too strong in this case, I don't believe there's a requirement that these be equal. It would be nice if they would, though. |
BuiltinFunctionType
and BuiltinMethodType
are differentBuiltinFunctionType
and BuiltinMethodType
are different
Sorry for my bad english. I can't find words other than 'must be', 'should be'. |
Roughly, adding It looks like a good next-step issue for who understand how python binding works and finished a few good first issues. |
>>>>> import types
>>>>> types.BuiltinFunctionType == types.BuiltinMeth
odType
False
>>>>> type(len) == type([].append)
False Oh sorry, my mistake |
I'm working on this issue. I left this comment to avoid task conflicts. |
I'll take a look! |
Maybe, we can adapt the optimization idea but not about the exact types. |
Partially resolved by #4873 |
Feature
types.BuiltinFunctionType
must be equal totypes.BuiltinMethodType
.In other word, types returned by builtin function and types returned by builtin method must be of the same type.
In CPython
In RustPython
Python Documentation
BuiltinFunctionType and BuiltinMethodType have same descriptions.
Also, commented at source code.
The text was updated successfully, but these errors were encountered: