X Tutup
Skip to content

PEP for -m switch for extension modules#266

Merged
ncoghlan merged 3 commits intomasterfrom
unknown repository
May 31, 2017
Merged

PEP for -m switch for extension modules#266
ncoghlan merged 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 26, 2017

pep-9999.rst Outdated
the PEP 489 multi-phase initialization.

With this, a multi-phase initialization enabled module can be run
using following syntax::
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"using following syntax" -> "using the following command"

pep-9999.rst Outdated
Python's ``-m`` option.

The technical groundwork to make this possible has been done for PEP 489,
and enabling the ``-m`` option is listed in in that PEP's
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

duplicate "in"

pep-9999.rst Outdated

The module specified by ``-m`` is not imported normally.
Instead, it is executed in the namespace of the ``__main__`` module,
which is created quite since early in interpreter initialization.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"quite since early" -> "quite early"

pep-9999.rst Outdated

While PEP 489 was designed to make these changes generally possible,
it's necessary to decouple module discovery, creation, and initialization
steps for extension modules, so that anothe module can be used instead of
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you forgot the 'r' in 'anothe'

pep-9999.rst Outdated
In the multi-phase initialization case, the ``PyModuleDef`` and the module to
be initialized will be passed to a new function, ``PyModule_ExecInModule``.

This function raise ``ImportError`` if the ``PyModuleDef`` specifies
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"raise" -> "raises"

Marcel Plch and others added 2 commits May 26, 2017 15:16
@ncoghlan ncoghlan merged commit cd84e20 into python:master May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup