Adam DePrince wrote: > SetView implements: > .__contains__ > .add > .discard > .__len__
But what would there be to inherit from the mixin? Each view class will have entirely its own implementation of these, depending on the details of the base object. Inheritance in Python is *entirely* about implementation inheritance, not interface inheritance. > By allowing dict.keys() to announce "I'm a SetView" If you mean to make it possible for code to do if isinstance(something, SetView): ... that's another thing that Python tries to stay away from as much as possible. If what you're proposing is purely a conceptual classification, I still think it's far too elaborate. Anyone reading such a specification is going to have their eyes glaze over within a few milliseconds. -- Greg _______________________________________________ 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