On Mon, Jun 18, 2012 at 02:09:17PM -0400, Yury Selivanov wrote: > That's an excerpt from Signature.__deepcopy__: > > cls = type(self) > sig = cls.__new__(cls) > sig.parameters = OrderedDict((name, param.__copy__()) \ > for name, param in self.parameters.items()) > > And Parameter.__copy__: > > cls = type(self) > copy = cls.__new__(cls) > copy.__dict__.update(self.__dict__) > return copy > > So we don't recursively deepcopy parameters in Signature.__deepcopy__ > (I hope that we don't violate the deepcopy meaning here) I think you are. I would describe the above as a shallow copy, not a deep copy. I expect a deep copy to go *all the way down*, as deep as possible. Even if it makes no practical difference, I think it will be less confusing to just describe it as a "copy" rather than a deep copy, unless you recursively copy everything all the way down. -- Steven
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4