The message means just what it says. :-) There's no point in calling object.__new__() with more than a class parameter, and any code that did so was just dumping those args into a black hole.
The only time when it makes sense for object.__new__() to ignore extra arguments is when it's not being overridden, but __init__ *is* being overridden -- then you have a completely default __new__ and the checking of constructor arguments is relegated to __init__. The purpose of all this is to catch the error in a call like object(42) which (again) passes an argument that is not used. This is often a symptom of a bug in your program. --Guido On Feb 13, 2008 12:19 PM, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote: > -On [20080213 21:02], Guido van Rossum ([EMAIL PROTECTED]) wrote: > >What __new__ deprecation warning? > > Yes, sorry, I realized after sending that it might be a bit obtuse. > > With 2.6: > > DeprecationWarning: object.__new__() takes no parameters > return object.__new__(cls, uri) > > -- > Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai > イェルーン ラウフロック ヴァン デル ウェルヴェン > http://www.in-nomine.org/ | http://www.rangaku.org/ > I am the impossibility... > -- --Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________ 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