Check if variable is defined

Courageous jkraska1 at san.rr.com
Thu May 17 20:37:03 EDT 2001


>> I once wondered if vars(), locals() or globals() have a time cost to
>> produce the dictionary in a usable format

I'm too lazy to go over to my Python source tree at the moment,
but I believe that these already _are_ in Python dictionaries, right
inside Python. IOW, they aren't "producing" anything, they are
simply giving you a reference to an already-existing construct.

C//




More information about the Python-list mailing list