Petr Viktorin <[email protected]> added the comment:
We do, but here the test will need to be changed:
Python 3.7.3+ (heads/3.7:791e5fcbab, May 22 2019, 13:37:27)
[GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class IntWithDict:
... def __init__(self, **kwargs):
... self.kwargs = kwargs
... def __index__(self):
... self.kwargs.clear()
... return 0
...
>>> x = IntWithDict(dont_inherit=float())
>>> compile("", "", "", x, **x.kwargs)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: an integer is required (got type IntWithDict)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com