[Python-3000] callable()
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Jul 22 10:32:34 CEST 2006
Raymond Hettinger wrote:
> That would be at odds with the approach taken with
> list.__hash__ which has to be called in order to find-out it is not
> hashable.
That feature of __hash__ is just an unfortunate necessity.
It arises because hashability is sometimes a "deep"
property (i.e. it depends on the hashability of a
container's contents as well as the nature of the
container itself). No such thing applies to __iter__.
--
Greg
More information about the Python-3000
mailing list