[Python-ideas] relaxing keyword usage restrictions
hetchkay at gmail.com
Fri Sep 9 09:21:18 CEST 2011
> [i for i in range(2**100) if i < 1]
> The execution is not in a server but in the user's machine/environment. If
the user wants to do something like that, it would be the user's problem.
Nothing prevents the user from doing the same things in a python process
invoked by her, right?
> P.S.. Yes, that's valid scheme? So what? Redefining 'define' pretty much
> guarantees that the rest of your program will fail.
> (define define 3)(display (* define 5)) => 15(define x 4) => FAIL
> The fact that another language allows you to shoot yourself in the foot
> isn't a good argument that Python should allow that too.
> Yes, scheme does not have special syntax for 'keywords' but still allows
keywords to be overridden. But nothing (but syntax highlighters) will break
in Python by allowing keywords as identifiers, and so it is a less drastic
change for Python.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas