Terry Reedy wrote in news:[EMAIL PROTECTED] in comp.lang.python:
>> def main(): >> number = number() > > Within a function, a given name can be either global or local, but not > both. > Here you are expecting the compiler to interpret the first occurance > of 'number' as local and the second as global. Humans can often > resolve such ambiguities correctly, but not necessarily always. So > this is too much to ask of a program and hence it is not allowed. > ".. asked too much of the programme", sounds like a BOFH excuse to me ;-). Seriously I'd bet (if I were a gambling man) that this is by design, not either of "too much work for the interpreter" or "nobody's submitted a patch". IOW: Why should the intepreter do more work just so the user can find new and interesting ways to shoot them selves in the foot. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list