[Python-Dev] Decimal - context manipulation

Batista, Facundo FBatista at uniFON.com.ar
Wed Apr 21 12:55:50 EDT 2004


[Tim Peters]

#- Note that __copy__ is a special name, and the standard 
#- copy.copy(thing)
#- automatically invokes thing.__copy__() if thing has a 
#- __copy__() method.
#- The "copy = __copy__" line then supplies that method 
#- directly to class users
#- too under a conventional name.  So, after the above, 
#- copy.copy(thing) and
#- thing.copy() both work.

I'm +1 on introducing this behaviour to Context.

.	Facundo



More information about the Python-Dev mailing list