Jon Clements <jon...@googlemail.com> writes: > import inspect > if inspect.ismethod(foo): > # ... > > Will return True if foo is a bound method.
But under what other conditions will it return True? The name suggests that *any* method – static method, class method, bound method, unbound method – will also result in True. The documentation says only “instance method”, though. Confusing :-( -- \ “Airports are ugly. Some are very ugly. Some attain a degree of | `\ ugliness that can only be the result of a special effort.” | _o__) —Douglas Adams, _The Long Dark Tea-Time Of The Soul_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list