◐ Shell
clean mode source ↗

gh-97956: Mention `generate_global_objects.py` in `AC How-To` by sobolevn · Pull Request #97957 · python/cpython

larryhastings

Choose a reason for hiding this comment

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

It's a good idea to add this step to the documentation. But I have some suggestions on how to rewrite the text to make it a little clearer. Please take a look!



16. Compile, then run the relevant portions of the regression-test suite.
16. Code generated by Argument Clinic might use ``_Py_ID`` macro inside.

Choose a reason for hiding this comment

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

  1. Argument Clinic may generate new instances of _Py_ID. For example::

&_Py_ID(new_unique_py_id)

It means that you would need to run ``Tools/scripts/generate_global_objects.py``

Choose a reason for hiding this comment

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

If it does, you'll have to run Tools/scripts/generate_global_objects.py to regenerate the list of precompiled identifiers at this point.

Choose a reason for hiding this comment

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

Thanks, done!

It is always great to have native-speakers to double check things like this. I think in another language and it does not translate that well into English in some cases :)