Skip to content

object.__init__() takes no parameters in test_inheritance #1413

@slozier

Description

@slozier

In IronPython.test_inheritance there are tests which are similar to:

import System

class test(System.Collections.Generic.List[System.Int32]):
    def __init__(self):
        super().__init__(1)

test()

which fail with:

TypeError: object.__init__() takes no parameters

These tests worked with IronPython 2 and raised a DeprecationWarning. I'm not entirely sure what the purpose of having the super().__init__ calls on a .NET class (which doesn't define __init__). I think having it throw TypeError is correct and the tests should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions