Issue 1684943: Keyword arguments to init() of a subclass of set (original) (raw)

Passing a keyword argument to a subclass of the built-in class "set" causes a TypeError in Python 2.4.2 and newer but not in 2.4.0. Example:

class Test(set): def init(self, a=0): self.add(a)

t = Test(a=0)

In Python 2.4.0 it works as expected whereas in 2.4.2 and 2.4.4, it yields:

Traceback (most recent call last): File "", line 1, in ? TypeError: set() does not take keyword arguments

I don't pass a keyword argument to set.init() but to its subclass!