Index: Doc/library/pickle.rst =================================================================== --- Doc/library/pickle.rst (revisión: 70360) +++ Doc/library/pickle.rst (copia de trabajo) @@ -459,6 +459,16 @@ value, the :meth:`__setstate__` method will not be called. +.. note:: + + At unpickling time, some methods like :meth:`__getattr__`, + :meth:`__getattribute__`, :meth:`__setattr__` may be called upon the + instance. In case those methods rely on some internal invariant being true, + the type should implement either :meth:`__getinitargs__` or + :meth:`__getnewargs__` to establish such invariant; otherwise, neither + :meth:`__new__` nor :meth:`__init__` will be called. + + Pickling and unpickling extension types ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^