From the copydocumentation :
copy
Classes can use the same interfaces to control the copy that they use to control etching.[...]So that a class can define its own copy implementation, it can define special methods __copy__()and__deepcopy__()
Classes can use the same interfaces to control the copy that they use to control etching.
[...]
So that a class can define its own copy implementation, it can define special methods __copy__()and__deepcopy__()
__copy__()
__deepcopy__()
So who is this? __setstate__()and __getstate__(), which are used for etching, or __copy__()and __deepcopy__()?
__setstate__()
__getstate__()
: __copy__, copy.copy ( __deepcopy__ copy.deepcopy). , , ( , , __getstate__ __setstate__; "Python " ( @ilfaraone ).
__copy__
copy.copy
__deepcopy__
copy.deepcopy
__getstate__
__setstate__
__setstate__() __getstate__().
, , , .
Python , Python.
Source: https://habr.com/ru/post/1717194/More articles:Элементы управления ASP.NET - проблема с программным обеспечением множественных экземпляров? - asp.netOverlap in UITableViewCell with UITableViewCellStyleSubtitle - uitableviewNSString disables prematurely in UITableViewCell in version 3.0 but looks great in 3.1 - iphoneConfusing function search with templates in C ++ - c ++WebView JavaScript-ссылки работают при касании, но не при использовании трекбола - androidDelphi call method based on RTTI information - rttiDefining the perfect hash lookup table for Pearson Hash - hashtableКак читать шестнадцатеричные числа в неподписанном int в C - cFind Silverlight Control TreeViewItem Header - silverlightSelect a random phrase from the list - randomAll Articles