Greg Ewing wrote: > 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".
Only if the slot isn't automatically set to NULL iff the corresponding attribute is set to None. (The "no __xxx__ attribute" error message doesn't make sense then either, but I think the real messages are more in the style of "xxx is not hashable"). Georg _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
