[issue21728] Confusing error message when initialising type inheriting object.__init__

2021-04-16 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21728] Confusing error message when initialising type inheriting object.__init__

2021-02-04 Thread Irit Katriel
Irit Katriel added the comment: Looks like this was fixed under issue31506. In any case it works for me now: >>> A(42) Traceback (most recent call last): File "", line 1, in TypeError: A() takes no arguments -- nosy: +iritkatriel resolution: -> fixed status: open -> pending

[issue21728] Confusing error message when initialising type inheriting object.__init__

2014-06-11 Thread Gerrit Holl
initialising type inheriting object.__init__ type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21728 ___ ___ Python-bugs-list mailing list

[issue21728] Confusing error message when initialising type inheriting object.__init__

2014-06-11 Thread R. David Murray
R. David Murray added the comment: See issue 7963 for a clue to why you get this message. That is, it is object.__new__ that is getting called, not object.__init__, and __new__ methods result in different error messages than __init__ methods. I don't know if there is a practical way to make

Re: Inheriting Object

2011-05-20 Thread Ian Kelly
On Thu, May 19, 2011 at 10:11 PM, Navkirat Singh n4vpyt...@gmail.com wrote: Thanks Guys...I will look deeper into this. I thought I read somewhere that it was required in older python releases, but in newer releases it is not. I might be wrong though. In Python 3.x all classes inherit from

Inheriting Object

2011-05-19 Thread Navkirat Singh
Hi Guys, I have been wondering for a while now as to why some classes inherit Object? And what does it really do for the class? Can anyone shed some light on this? Regards, Nav -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheriting Object

2011-05-19 Thread MRAB
On 20/05/2011 03:13, Navkirat Singh wrote: Hi Guys, I have been wondering for a while now as to why some classes inherit Object? And what does it really do for the class? Can anyone shed some light on this? Read section 3.3 New-style and classic classes in the Python docs. --

Re: Inheriting Object

2011-05-19 Thread William
Hi Nav: Here is the long why. http://www.python.org/download/releases/2.2.3/descrintro/ I guess for most programs, there is no big difference, but if you use some special features that might be different. Say, could use super when using type() instead of class(), also, when using

Re: Inheriting Object

2011-05-19 Thread William
Hi Nav: Here is the long why. http://www.python.org/download/releases/2.2.3/descrintro/ I guess for most programs, there is no big difference. But in term of some new added features in python, you might not be able to work. Say, you could not use super in type, also you can't

Re: Inheriting Object

2011-05-19 Thread William . Bai
Hi Nav: Here is the long why. http://www.python.org/download/releases/2.2.3/descrintro/ I guess for most programs, there is no big difference. But in term of some new added features in python, you might not be able to work. Say, you could not use super in type, also you can't

Re: Inheriting Object

2011-05-19 Thread Navkirat Singh
On Fri, May 20, 2011 at 8:25 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 20/05/2011 03:13, Navkirat Singh wrote: Hi Guys, I have been wondering for a while now as to why some classes inherit Object? And what does it really do for the class? Can anyone shed some light on this? Read