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
In #88089 (comment)@gvanrossum suggested to set __class_getitem__ = None if we want to make a subclass of indexable class (like tuple or dict) non-indexable. Indeed, it causes indexing to raise a TypeError, but with general message: "'NoneType' object is not callable".
It could be improved.
The text was updated successfully, but these errors were encountered:
In #88089 (comment) @gvanrossum suggested to set
__class_getitem__ = None
if we want to make a subclass of indexable class (liketuple
ordict
) non-indexable. Indeed, it causes indexing to raise a TypeError, but with general message: "'NoneType' object is not callable".It could be improved.
The text was updated successfully, but these errors were encountered: