Suggesting for overloading the assign operator

Steven Taschuk staschuk at telusplanet.net
Wed Jul 2 10:21:57 EDT 2003


Quoth Bengt Richter:
  [...suggests a := b equivalent to a.__update__(b)...]
> I guess it's a matter of what kind of sugar you like ;-)

Quite.

  [...syntactic support for Currency objects...]
> I'm not sure what that would mean.

I meant a language like Python but with a Currency literal syntax.
With syntax such as, say,
    123.45$  equivalent to  Currency(123.45)
(except, perhaps, for decimal vs binary exactness issues), the
users could type
    a = 7$
    # ...
    a = 6$
which is less onerous than writing Currency(7), Currency(6).

This idea is well-suited to the scenario in which the users make
pervasive use of objects of this type, and the main problem is
having to type "Currency" over and over again.

  [...]
-- 
Steven Taschuk                               staschuk at telusplanet.net
"What I find most baffling about that song is that it was not a hit."
                                          -- Tony Dylan Davis (CKUA)





More information about the Python-list mailing list