Function
mechanize._opener.methnames_of_class_as_dict

Signature

methnames_of_class_as_dict(klass)

Documentation String

It is possible for an attribute to be present in the results of dir(inst), but for getattr(inst, attr_name) to raise an Attribute error, that should be handled gracefully.

>>> class BadClass(object): ... def error(self): ... raise AttributeError ... error = property(error) ... __bases__ = []

>>> klass = BadClass() >>> error in dir(klass) True >>> klass.error Traceback (most recent call last): ... AttributeError

>>> result = methnames_of_class_as_dict(klass) # no exception