Skip to content

In terms of immutable classes, such as int__ new__ () does the definition of function stipulate that only 2 parameters can be accepted? #95050

Closed as not planned
@Schira4396

Description

@Schira4396

As shown in the figure, when inheriting the int class, override__ new__ () method. When extra parameters are added, an error will be reported
image

image
Why?
I know this is a call to int__ new__ (), except int__ new__ () it's stipulated like this, otherwise it can't convince me
If not, can you give an explanation? be deeply grateful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions