if statement, with function inside it: if (t = Test()) == True:

Marco Mariani marco at sferacarta.com
Fri Apr 24 15:21:03 CEST 2009


Ulrich Eckhardt wrote:

>>> t = Test()
>>> if (t == 'Vla':
>>>     print t # must contain Vla
>>
>> What's wrong with that?
> 
> It unnecessarily injects the name 't' into the scope.

Since there is no concept in Python of a scope local to block 
statements, I don't understant what you would like to happen instead.



More information about the Python-list mailing list