Skip to content

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

Merged
ZeroIntensity merged 3 commits into
python:mainfrom
ZeroIntensity:more-arg-clinic
Oct 21, 2026
Merged

ZeroIntensity merged 3 commits 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
Comment thread Tools/clinic/libclinic/slots.py Outdated
(): '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'),
    ),

@ZeroIntensity
ZeroIntensity enabled auto-merge (squash) October 21, 2026 16:22
@ZeroIntensity
ZeroIntensity merged commit 65b7e94 into python:main Oct 21, 2026
62 checks passed
@ZeroIntensity
ZeroIntensity deleted the more-arg-clinic branch October 21, 2026 18:07
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sprint Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants