PyDocs

Nav

Python Runtime Services

object.__getnewargs_ex__

builtins

method of object
  • object.__getnewargs_ex__()
In protocols 2 and newer, classes that implement the __getnewargs_ex__() method can dictate the values passed to the __new__() method upon unpickling. The method must return a pair (args, kwargs) where args is a tuple of positional arguments and kwargs a dictionary of named arguments for constructing the object. Those will be passed to the __new__() method upon unpickling.
Changed in 3.6
  • 3.6: __getnewargs_ex__() is now used in protocols 2 and 3.
0 Examples
No examples for builtins/object.__getnewargs_ex__.
See Also
No see-alsos for builtins/object.__getnewargs_ex__
0 Notes
No notes for object.__getnewargs_ex__