Roman assignments (Re: Overloadable Assignment PEP)

Aahz aahz at pythoncraft.com
Thu Apr 3 23:45:16 EST 2003


In article <b6in8i$600fi$1 at ID-169208.news.dfncis.de>,
Greg Ewing (using news.cis.dfn.de) <ckea25d02 at sneakemail.com> wrote:
>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.

...and if we add a

    from __past__ import FORTRAN

it only applies when the names are I, J, K, L, M, or N.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz, c.l.py, 2/4/2002




More information about the Python-list mailing list