bpo-39573: Add Py_IS_TYPE macro by corona10 · Pull Request #18488 · python/cpython (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation20 Commits4 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

corona10

vstinner

Choose a reason for hiding this comment

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

I suggest to modify Argument Clinic in a separated PR, but use this PR to update PyXXX_CheckExact() macros. See: nascheme@c156300

You should credit Neil if you reuse his commit: add Author: Neil Schemenauer <nas-github@arctrix.com> at the end of your commit message.

@corona10

@codecov

@corona10 corona10 changed the titlebpo-39573: Add Py_IS_TYPE macro [WIP] bpo-39573: Add Py_IS_TYPE macro

Feb 12, 2020

@corona10

Co-Author: Neil Schemenauer nas-github@arctrix.com

@corona10 corona10 changed the title[WIP] bpo-39573: Add Py_IS_TYPE macro bpo-39573: Add Py_IS_TYPE macro

Feb 12, 2020

corona10

Choose a reason for hiding this comment

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

vstinner

@corona10

@corona10

vstinner

Equivalent to: Py_TYPE(o) == type.
.. versionadded:: 3.9

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Oh sure :)

Choose a reason for hiding this comment

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

Wait, @brandtbucher wrote PR #18496. I will ask him to fix the typo there. You can ignore this special request ;-)

Choose a reason for hiding this comment

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

Got it ;-)

Choose a reason for hiding this comment

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

Current

스크린샷 2020-02-13 오후 11 23 37

Suggestion

스크린샷 2020-02-13 오후 11 15 15

Looks like not work as we want ;)

@corona10

@corona10

@vstinner

Thanks, merged. You can now redo your Argument Clinic change on top of it.