[issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict)

Raymond Hettinger report at bugs.python.org
Thu Feb 7 17:23:56 EST 2019


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

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

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35933>
_______________________________________


More information about the Python-bugs-list mailing list