In article <[email protected]>,
Duncan Booth <[email protected]> wrote:
> Also you cannot create a subclass of 'type' with non-empty slots (it throws
> a type error "nonempty __slots__ not supported for subtype of 'type'").
> However I don't think that's really relevant as even if they did allow you
> to use __slots__ it wouldn't prevent the creation of a __dict__ for the
> 'type' base class.
I played around a bit trying to write a metaclass which implemented:
def __getattribute__(self, name):
if name == "__dict__":
raise AttributeError
but didn't get very far. Maybe somebody with stronger metaclass-fu than
I have could run with this idea?
--
http://mail.python.org/mailman/listinfo/python-list