Comment on PEP-0238
bokr at accessone.com
Sat Jul 7 23:15:25 CEST 2001
On Sat, 07 Jul 2001 13:33:55 GMT, Guido van Rossum <guido at python.org>
>The "div" keyword would be ideal except for the added complexity of
>adding a new keyword to the language -- do we need a separate warning
>phase here, too?
>(Hm. For various reasons I'm very tempted to introduce 'yield' as a
>new keyword without warnings or future statements in Python 2.2, so
>maybe I should bite the bullet and add 'div' as well...)
What about a 'special' keyword for special semantic scoping,
to control meanings within a block, e.g.,
x = 1/2 # makes zero because of special scope
special use_rationals, use_auto_bignums:
x = 1/2 # makes rational in pref to float
x <<= 65 # auto promotion to long of numerator
# back to (proposed) normal
x = 1/2 # makes float 0.5 as normal default
This is not exactly PEP-ready, but I thought I'd offer the idea.
Maybe 'special' might also have natural tie-ins to migration issues?
BTW, should I have posted this under a new heading?
More information about the Python-list