On Sunday, February 20, 2011 11:01:38 PM UTC-5, rochacbruno wrote: 
>
>  Nice! I did not know about it, I always avoid the use of callable because 
> I knew it was deprecated in python 3.
>
 
You're excused for not knowing about it, as it was literally released just a 
few hours ago. :)
 

>  But now, how to decide which is the better way?
>
> hasattr( obj, '__call__') or callable(obj)
>
 
I think the latter looks better and seems more explicit. 

Reply via email to