Further questions on dictionaries, namespaces, etc.

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Aug 21 18:32:47 EDT 2005


Talin a écrit :
(snip)
> 2) Is there an easy way to determine if a given object has a callable 
> method named "unify"? 

if callable(getattr(obj, 'unify', None)):
    # obj.unify exists and is callable

Br



More information about the Python-list mailing list