Greg Ewing wrote:

>> A common Python idiom is to take different actions based on the capabilities
>> of an object rather than its type.
>
> I have no objection to that when the capability can be
> tested for easily and efficiently and without danger of
> causing undesirable side effects. But callability is
> not such a capability, therefore I think it's a bad
> idea to design an API which relies on being able to
> test for it.

it's spelled callable(), is successfully used in popular and well-designed 
API:s, is well-
defined in terms of duck-typing, and all counter-examples we've seen on this 
list are
utterly contrived.

(and even if you dig up one *real* example where false callable positives are a 
real
problem, I can assure you that there exists a trivial workaround for that 
specific case,
no matter what it is)

</F> 



_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to