Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-69695: Update PyImport_ImportModule description #103836

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

patenaud
Copy link

import.rst file updated

gh-69695: PyImport_ImportModule description updated

@AA-Turner AA-Turner changed the title doc: update import.rst PyImport_ImportModule description #69695 GH-69695: Update PyImport_ImportModule description Apr 25, 2023
@arhadthedev arhadthedev added skip news docs Documentation in the Doc dir awaiting review labels Apr 25, 2023
import of a module doesn't leave the module in :data:`sys.modules`.

This function always uses absolute imports.
This is a wrapper around :c:func:`PyImport_Import()` which takes a ``const char *`` as an argument instead of a ``PyObject *``.
Copy link
Member

Choose a reason for hiding this comment

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

You could maybe use c:expr syntax here?:

Suggested change
This is a wrapper around :c:func:`PyImport_Import()` which takes a ``const char *`` as an argument instead of a ``PyObject *``.
This is a wrapper around :c:func:`PyImport_Import()` which takes a
:c:expr:`const char *` as an argument instead of a ``PyObject *``.

Regardless of that please wrap the line, i.e.:

Suggested change
This is a wrapper around :c:func:`PyImport_Import()` which takes a ``const char *`` as an argument instead of a ``PyObject *``.
This is a wrapper around :c:func:`PyImport_Import()` which takes a
``const char *`` as an argument instead of a ``PyObject *``.

A

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't the :c:expr: use also apply to PyObject *?

Copy link
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

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

The new lines are too long; I suspect Adam's line wrapping suggestions should fix the issue.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants