This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author carsten.klein@axn-software.de
Recipients carsten.klein@axn-software.de
Date 2010-08-22.14:42:18
SpamBayes Score 2.1900288e-09
Marked as misclassified No
Message-id <1282488141.53.0.297735015406.issue9659@psf.upfronthosting.co.za>
In-reply-to
Content
Example

class a(frozenset):
    def __init__(self, iterable):
        super(a, self).__init__(iterable)


i = a([1,2,3])
> __main__:3: DeprecationWarning: object.__init__() takes no parameters
> a([1, 2, 3])


This might be due to the fact that the frozenset type structure does not initialize the tp_init field in setobject.c, thus inheriting the original __init__ from object.

Subclassing set will not issue that warning as it actually defines the tp_init field to (initroc)set_init.

This holds true also for the Python 2.7 release and maybe also later releases.

Expected behaviour: do not output that warning message and provide an initproc for the tp_field.
History
Date User Action Args
2010-08-22 14:42:21carsten.klein@axn-software.desetrecipients: + carsten.klein@axn-software.de
2010-08-22 14:42:21carsten.klein@axn-software.desetmessageid: <1282488141.53.0.297735015406.issue9659@psf.upfronthosting.co.za>
2010-08-22 14:42:19carsten.klein@axn-software.delinkissue9659 messages
2010-08-22 14:42:18carsten.klein@axn-software.decreate