On Tue, Jun 19, 2012 at 12:00 PM, Yury Selivanov <yselivanov...@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 | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com