vars().has_key() question about how working .

Chris Rebert clp2 at
Sun Apr 4 04:51:09 EDT 2010

On Sun, Apr 4, 2010 at 1:42 AM, catalinfest at
<catalinfest at> wrote:
> Hi everyone .
> My questions is "why vars().has_key('b') is False ?'
> I expecting to see "True" because is a variable ...

The built-in constants and functions aren't global variables, they're
in the special __builtins__ dictionary/namespace, and thus not part of
globals() or vars().


More information about the Python-list mailing list