On 3/29/22 09:14, Christopher Barker wrote:
> [...] I tried to use __slots__ in TupleWithNames, but apparently you can't
use __slots__ in a
> tuple subclass ('cause tuple's already using it ??) -- but that could be done
in a builtin.
> then it wouldn't need a __dict__
The `__dict__` is needed to store the field names -- did you add `__dict__` to the `__slots__`? (Of course, if you've
added `__dict__` then you lose the limited size of `__slots__`.)
--
~Ethan~
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/B3JZKXQ4HDW5IRNMYKDKB5QFGHRR42AH/
Code of Conduct: http://python.org/psf/codeofconduct/