prePEP: Money data type

Batista, Facundo FBatista at uniFON.com.ar
Mon Oct 20 14:50:06 EDT 2003


#- So you think y=x/2 should not work when x is an instance of Money,
#- nor should y=x*z when x is an instance of Money and z is e.g. 0.5?
#- That seems pretty limiting to me.

*Too much* limiting to me.


#- repr + eval "round-trips" for many types that don't have Python
#- literals, net of the issue of whether the type's name as given
#- by repr includes the module name (and thus roundtrips after an
#- import statement) or doesn't (and thus roundtrips after a from
#- statement) -- it seems that it more often doesn't.

I think Money should make this round trip. I'll put in the PEP that to a
given m=Money(...),  m == eval(repr(m)).

.	Facundo





More information about the Python-list mailing list