Roman assignments (Re: Overloadable Assignment PEP)

Greg Ewing (using ckea25d02 at
Fri Apr 4 03:39:36 CEST 2003

A. Lloyd Flanagan wrote:
> Oh, good, if this had turned out to be a joke, I'd be afraid I won't
> get my Roman numeral literals after all.

The Roman numerals PEP seems unlikely to get passed
in any case, but perhaps we can rescue something from
it to help with this problem: we could apply
augmented assignment semantics when and only when
the name being assigned to resembles a Roman numeral.

This very neatly solves the "voltage" problem,
because then

   V = 3

would be an augmented assignment, whereas

   Voltaire = 3

would just be an ordinary assignment.

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list