[PEAK] Immutable instanciation

jdutreve at free.fr jdutreve at free.fr
Mon Oct 25 14:46:31 EDT 2004


Hi all,

I'm looking for a mean to instanciate Money like Money(1.56, Currency.USD)
instead of Money(amount=1.56, currency=Currency.USD).

class Money(model.Struct):

    class amount(model.structField):
        referencedType = FixedPoint
        defaultValue = 0

    class currency(model.structField):
        referencedType = Currency
        defaultValue = Currency.EUR

Thanks,
Jean-Philippe



More information about the PEAK mailing list