On Tue, Jun 19, 2012 at 12:00 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote: > On 2012-06-18, at 9:36 PM, Nick Coghlan wrote: >> So keep the current copying semantics for Signature objects (i.e. >> creating new copies of the Parameter objects as well), but call it a >> shallow copy rather than a deep copy. Make it clear in the >> documentation that any defaults and annotations are still shared with >> the underlying callable. > > So, 'Signature.__deepcopy__()' -> 'Signature.shallow_copy()'? Or make > it private - 'Signature._shallow_copy()'? I'd just call it Signature.__copy__ :) You're not doing anything unusual here, just declaring that the list of parameters is a part of the Signature object's state, and thus even a shallow copy shouldn't share the parameter objects. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
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