python / cpython

The Python programming language
https://www.python.org
Other
62.17k stars 29.88k forks source link

DOC: C/API Execution namespace undocumented. (patch included) #53708

Open f8a59035-e116-44bb-8c5c-ddaf44c84ed6 opened 14 years ago

f8a59035-e116-44bb-8c5c-ddaf44c84ed6 commented 14 years ago
BPO 9499
Nosy @ideasman42
Files
  • doc_py3_main_mod.diff: Patch against r83689.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['3.8', '3.9', '3.10', 'expert-C-API', 'type-feature', 'docs'] title = 'DOC: C/API Execution namespace undocumented. (patch included)' updated_at = user = 'https://github.com/ideasman42' ``` bugs.python.org fields: ```python activity = actor = 'ideasman42' assignee = 'docs@python' closed = False closed_date = None closer = None components = ['Documentation', 'C API'] creation = creator = 'ideasman42' dependencies = [] files = ['18357'] hgrepos = [] issue_num = 9499 keywords = [] message_count = 3.0 messages = ['112706', '220846', '380179'] nosy_count = 2.0 nosy_names = ['ideasman42', 'docs@python'] pr_nums = [] priority = 'normal' resolution = None stage = 'needs patch' status = 'open' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue9499' versions = ['Python 3.8', 'Python 3.9', 'Python 3.10'] ```

    f8a59035-e116-44bb-8c5c-ddaf44c84ed6 commented 14 years ago

    Some parts of the python api expect __main__ module dictionary to be the namespace when executing a script, this is true when running a python script from the python binary but NOT true when running a compiled script from the C/API which can lead to bugs which are not easy to solve unless the C/API author knows this.

    83d2e70e-e599-4a04-b820-3814bbdb9bef commented 10 years ago

    Can somebody review this small patch please.

    f8a59035-e116-44bb-8c5c-ddaf44c84ed6 commented 3 years ago

    This patch is still relevant, mentioning this since the patch is from a while ago.