bpo-39573: Use Py_IS_TYPE to check for types by shihai1991 · Pull Request #19882 · python/cpython

@shihai1991

@shihai1991

@shihai1991

rough idea: Can we create a review robot to remind committer use the common macros or inline functions?

@corona10 corona10 changed the title WIP: Use Py_IS_TYPE to check for types bpo-39573: [WIP] Use Py_IS_TYPE to check for types

May 3, 2020

@corona10

This PR can be part of bpo-39573 which actually introducing and applying Py_IS_TYPE for the first time.

corona10

Choose a reason for hiding this comment

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

We often do not accept the PR which can be just refactoring work with insignificant reason.
However, this PR is handling module what #18521 did not.
So I approve of this change as the exception.

But we need to hear @vstinner 's opinion :)

Thanks for the work

@shihai1991

This PR can be part of bpo-39573 which actually introducing and applying Py_IS_TYPE for the first time.

yeap. You are the author ;)

@shihai1991 shihai1991 changed the title bpo-39573: [WIP] Use Py_IS_TYPE to check for types bpo-39573: Use Py_IS_TYPE to check for types

May 3, 2020

@corona10

@shihai1991
But I approve the current change, so if the PR is updated for the more module.
Please request a review again.

@shihai1991

@shihai1991
But I approve the current change, so if the PR is updated for the more module.
Please request a review again.

Thanks, I have checked all modules, there have no more should be ported.