This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petr.viktorin
Recipients jdemeyer, petr.viktorin, vstinner
Date 2019-05-22.11:41:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558525304.0.0.682670325309.issue36907@roundup.psfhosted.org>
In-reply-to
Content
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)
History
Date User Action Args
2019-05-22 11:41:44petr.viktorinsetrecipients: + petr.viktorin, vstinner, jdemeyer
2019-05-22 11:41:43petr.viktorinsetmessageid: <1558525304.0.0.682670325309.issue36907@roundup.psfhosted.org>
2019-05-22 11:41:43petr.viktorinlinkissue36907 messages
2019-05-22 11:41:43petr.viktorincreate