On 06/06/2012 11:56 PM, Nick Coghlan wrote:
I'd say return a copy in the first case to be safe against accidental modification. If someone actually wants in-place modification, they can access __signature__ directly.
I really don't understand this anxiety about mutable Signature objects. Can you give a plausible example of "accidental modification" of a Signature object? I for one--as clumsy as I am--cannot recall ever "accidentally" modifying an object.
I really don't think signature() should bother copying/deep-copying the Signature before returning it.
//arry/
_______________________________________________ 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