I'm not sure what you mean by initialized. If you're asking if the identifier exists in the namespace, then you can use hasattr(), or simply try to reference it and catch the exception if it doesn't exist.
If the identifier exists, it always has a value. On the other hand, there is a small gotcha on identifiers in functions/methods where they have to have a value assigned before you can reference them. If you run into this at all frequently, you're probably making your methods too big to be easily understood. Of course, if you're playing games with the stack and trying to print out the values of identifiers on the calling chain on an exception, all bets are off. See the code in the py.test module (part of the PyPy project) for how you can do this. John Roth "Patrick Fitzsimmons" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I'm sure I should know this, but I can't find it in the manual. Is there a function in Python like the function in PHP isset()? It should take a variable name and return True or False depending on whether the variable is initialized. Thanks for any help, Patrick -- http://mail.python.org/mailman/listinfo/python-list