Why are so many built-in types inheritable?

Georg Brandl g.brandl-nospam at gmx.net
Fri Mar 31 04:35:52 EST 2006

Antoon Pardon wrote:

> Well that looks somewhat short sighted to me. It is also why python
> seems to throws so many surprises at people.
> My impression is that quite frequently people come here with a question
> about why something doesn't work, that normally could be expected to
> work.

> The reason why it doesn't work then seems to boil down to the
> developpers not taking the trouble of implementing something
> in general but only for the cases for which they could imagine
> a use case. Which means that when someone comes up with a use
> case later he is stuck.

I think you're overgeneralizing here. Do you have other examples of
such a strategy resulting in something that doesn't work although
it should?

Nota bene: Often developers run into a limitation that is the result
of a deliberate design choice, such as "why aren't strings mutable?"

> I know about practicality beating purity, but purity has it
> practical aspects too. If the python people had been willing
> to work a bit more at purity, that would have been a lot
> of more practical for those who found something not working
> as expected, although they had no reason to suspect so.

I've told you already: if a developer wants a feature not currently
implemented, he/she can
 - ask on python-dev why
 - submit a feature request
 - submit a patch

If he/she's not able to do one of these, he/she can at least convince some
other Python developer if the use case is strong enough.


More information about the Python-list mailing list