Message335044
Interestingly, you can also put an instance dict in slots:
>>> class A:
__slots__ = ['x', '__dict__']
>>> a = A()
>>> a.x = 5
>>> a.y = 6
>>> a.__dict__
{'y': 6}
>>> a.x
5 |
|
Date |
User |
Action |
Args |
2019-02-07 22:23:57 | rhettinger | set | recipients:
+ rhettinger, pitrou, alexandre.vassalotti, docs@python, serhiy.storchaka, pierreglaser |
2019-02-07 22:23:56 | rhettinger | set | messageid: <1549578236.37.0.0290751439768.issue35933@roundup.psfhosted.org> |
2019-02-07 22:23:56 | rhettinger | link | issue35933 messages |
2019-02-07 22:23:56 | rhettinger | create | |
|