[Python-3000] callable()
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Jul 27 03:04:02 CEST 2006
Guido van Rossum wrote:
> I'd be happy to extend the convention to all such attributes --
> setting it to None to mean that the subclass doesn't want to provide
> it. That's clean, can't possibly be interpreted to mean anything else,
> and doesn't require you to actually call the attribute.
Although unless there's some special casing for it in the
interpreter, attempting to use such an attribute will
give a somewhat confusing error message -- something
like "Object of type NoneType is not callable" instead
of "Object of type <YourClass> has no __xxx__ attribute".
More information about the Python-3000
mailing list