Dennis Heuer wrote:
> The real misunderstanding lies somewhere else. I thought that the
> bitarray's instance would have more control over the long type's
> instance, like with the mutable types. I thought that the long type's
> superclass would provide methods similar to __setitem__ that would
> allow the bitarray instance to even *refresh* (or substitute) the long
> instance in place. The result would be a freshly created long instance
> substituting the old one. But the immuntable types do not offer such a
> feature because one cannot substitute the long instance without
> breaking the bitarray instance too.

Maybe that's the misunderstanding: but then you are still left with
the mis-design. Even if long was mutable, or even if you used a mutable
type as the base type (such as array.array), you *still* shouldn't
inherit from it - these types are not in an "is-a" relationship.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to