[Python-Dev] Breaking calls to object.__init__/__new__

Guido van Rossum guido at python.org
Thu Mar 22 05:42:34 CET 2007


On 3/21/07, Terry Reedy <tjreedy at udel.edu> wrote:
> It seems to me that to get the exact behavior one wants at the apex of a
> diamond structure, one should subclass object and override .__init__  with
> a function that does not call object.__init__  and use that subclass as the
> apex instead of object itself.  Wouldn't this mask the behavior of
> object.__init__ and whatever changes decided on?

Yup, that's what I recommended for Aahz.

> (But having said that, I have no opiniou on what the default should be for
> those who don't do this.)

I do now -- for the single inheritance case, refusing extra args makes
the most sense too, so that sohuld be the default in 3.0. With a Py3k
warning in 2.6.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list