Suggesting for overloading the assign operator

Ian Bicking ianb at
Thu Jul 3 02:16:14 CEST 2003

On Wed, 2003-07-02 at 15:09, Bengt Richter wrote:
> Hm, it just occurred to me that one could have yet another form of sugar
> [ It's now later, and I think this may be more than sugar ;-) ]
> to help with this, by treating the dot operator slightly more symmetrically,
> like, e.g., '+'.
> Example, then explanation:
>      a = 7 .USD   # (using symbols from by convention, no hard defs)
>      # ...
>      a = 6 .USD

Does 7 .USD *really* look that much better than USD(7)?  And, really,
how often do you need currency literals?  All my currency values come
from non-literal sources -- databases and XML files, an excel
spreadsheet, etc.  I don't think this objection is particular to
currency either -- for most types this is true.  If you are using them a
lot, you are acquiring them from non-code sources.

Though I suppose Rebol would be a counterexample.  And, in the case of
scripting (a kind of programming, not a kind of programming language :)
it might be a more valid need.  But most of Rebol's interesting data
types aren't syntactically valid in Python anyway.


More information about the Python-list mailing list