<div dir="ltr">Currently <a href="http://docs.python.org/3.4/library/pickle.html#object.__reduce__">__reduce__</a> returns up to five things:<div><br></div><div>(1) self.__new__ (or a substitute)</div><div>(2) the result of <a href="http://docs.python.org/3.4/library/pickle.html#object.__getnewargs__">__getnewargs__</a>, which returns a tuple of positional arguments for <a href="http://docs.python.org/3.4/reference/datamodel.html#object.__new__">__new__</a>,<br></div><div>(3) the result of <a href="http://docs.python.org/3.4/library/pickle.html#object.__getstate__">__getstate__</a>, which returns an object to be passed to <a href="http://docs.python.org/3.4/library/pickle.html#object.__setstate__">__setstate__</a></div><div>(4) an iterator of values for appending to a sequence</div><div>(5) an iterator of key-value pairs for setting on a string.</div><div><br></div><div>Python 3.4 added the very useful (for me) <a href="http://docs.python.org/3.4/library/pickle.html#object.__getnewargs_ex__">__getnewargs_ex__</a>, which returns a pair:</div><div>(1) a tuple of positional arguments for <a href="http://docs.python.org/3.4/reference/datamodel.html#object.__new__">__new__</a></div><div>(2) a dict of keyword arguments for <a href="http://docs.python.org/3.4/reference/datamodel.html#object.__new__">__new__</a></div><div><br></div><div>Therefore, I am proposing that __reduce__ return somehow these keyword arguments for __new__.</div><div><br></div><div>Best,</div><div>Neil</div></div>