Skip to content

gh-114258: Use Argument Clinic for __repr__ - #160011

Open
ZeroIntensity wants to merge 1 commit into
python:mainfrom
ZeroIntensity:more-arg-clinic
Open

ZeroIntensity wants to merge 1 commit into
python:mainfrom
ZeroIntensity:more-arg-clinic

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Sprint Oct 21, 2026
(): 'tp_iternext',
}),
'__repr__': SlotSpec('__repr__', 'PyObject *', 'object', {
(): 'tp_repr',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I found this definition design is weird. I will submit the new PR for this. Can you rebase it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, tag me for a review.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After #160012 is merged,

you can simply declare with

    '__repr__': (
        SlotSpec(return_converter='object'),
    ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants