We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.


hasattr(object, name) => bool

Checks for a named attribute.

The arguments are an object and a string. The result is True if the string is the name of one of the object’s attributes, False if not. (This is implemented by calling getattr and seeing whether it raises an exception or not.)