You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 31, 2020. It is now read-only.
Per Python docs 3.3.7 on the data model, for numeric types, "Methods corresponding to operations that are not supported by the particular kind of number implemented (e.g., bitwise operations for non-integral numbers) should be left undefined."
For illustration, we consider the Float type which doesn't support bitwise operations like <<. Given this test code:
self.assertCodeExecution("""
x = 0.0
try:
y = x.__lshift__
except Exception as err:
print(err)
print(type(err))
""")
We obtain the following output from the test suite:
AssertionError: '===end of test===\n' != "'float' object has no attribute '__lshif[47 chars]==\n"
+ 'float' object has no attribute '__lshift__'
+ <class 'AttributeError'>
===end of test===
: Global context
In CPython, there is an AttributeError just for accessing the attribute/method. In VOC, accessing works perfectly fine, it's only invoking the __lshift__() method that throws the AttributeError. This behavior is incorrect.
The text was updated successfully, but these errors were encountered:
Per Python docs 3.3.7 on the data model, for numeric types, "Methods corresponding to operations that are not supported by the particular kind of number implemented (e.g., bitwise operations for non-integral numbers) should be left undefined."
For illustration, we consider the Float type which doesn't support bitwise operations like
<<
. Given this test code:We obtain the following output from the test suite:
In CPython, there is an AttributeError just for accessing the attribute/method. In VOC, accessing works perfectly fine, it's only invoking the
__lshift__()
method that throws the AttributeError. This behavior is incorrect.The text was updated successfully, but these errors were encountered: