Hi everyone .
My questions is "why vars().has_key('b') is False ?'
I expecting to see "True" because is a variable ...
Thanks
Please see code bellow .
>>> x=11
>>> def something():
... b=25
...
>>> vars().has_key('x')
True
>>> vars().has_key('b')
False
>>> globals().has_key('x')
True
>>> globals().has_key('b')
False
>>>
--
http://mail.python.org/mailman/listinfo/python-list
- vars().has_key() question about how working . [email protected]
- Re: vars().has_key() question about how working... Chris Rebert
- Re: vars().has_key() question about how wor... Cata
- Re: vars().has_key() question about how... Chris Rebert
- Re: vars().has_key() question about... Chris Rebert
- Re: vars().has_key() question about how working... Paul McGuire
