Bug or Feature?

Michael Hudson mwh at python.net
Mon Nov 24 15:56:41 CET 2003

Stephan Diehl <stephan.diehl at gmx.net> writes:

> Although, the question was more along the line, if (in the light of the
> principle of least surprise) this behaviour makes sense.
> My private opinion would be, that the usefullness of builtin types as real
> types would be much better, if they were safe under inheritance.

The problem is that it's impossible for the int type to know about the
requirements of your subclass' constructor.  Explicit is better than
implicit, and all that.

For the example you posted, I don't see much of an advantage to
inheriting from int.


  If a train station is a place where a train stops, what's a
  workstation?                            -- unknown (to me, at least)

More information about the Python-list mailing list