[issue38872] Document exec symbol for codeop.compile_command
New submission from Cheryl Sabella <cheryl.sabella@gmail.com>: codeop.compile_command accepts 'exec' as a symbol, but it is not documented. Opening this bug report for an issue initially reported in PR3179. ---------- assignee: docs@python components: Documentation messages: 357118 nosy: cheryl.sabella, docs@python priority: normal severity: normal status: open title: Document exec symbol for codeop.compile_command type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Ananthakrishnan <ananthakrishnan15.2001@gmail.com> added the comment: code.compile_command takes _exec_ as symbol.As it is not documented or mentioned anywhere I can't find any details about that.Can anyone please tell me what it does? ---------- nosy: +Ananthakrishnan _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Change by Matthias Bussonnier <bussonniermatthias@gmail.com>: ---------- nosy: +mbussonn _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Matthias Bussonnier <bussonniermatthias@gmail.com> added the comment: See the `compile()` documentation for the difference between eval/single/exec: https://docs.python.org/3/library/functions.html#compile `exec` is meant for multiline program, for example you would "exec" the string read from a file to get a module. I don't think we should re-document what each of these does, but list the possible values that compile_command/CommandCompiler() can take. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Change by Joannah Nanjekye <nanjekyejoannah@gmail.com>: ---------- keywords: +patch nosy: +nanjekyejoannah nosy_count: 4.0 -> 5.0 pull_requests: +19356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20047 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: New changeset 7ba1f75f3f02b4b50ac6d7e17d15e467afa36aac by Joannah Nanjekye in branch 'master': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) https://github.com/python/cpython/commit/7ba1f75f3f02b4b50ac6d7e17d15e467afa... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +19403 pull_request: https://github.com/python/cpython/pull/20098 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +19404 pull_request: https://github.com/python/cpython/pull/20099 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Change by Joannah Nanjekye <nanjekyejoannah@gmail.com>: ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: New changeset c1203b75ffe429b28cb2e2480deb0d0b8d3a941c by Miss Islington (bot) in branch '3.7': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) (#20099) https://github.com/python/cpython/commit/c1203b75ffe429b28cb2e2480deb0d0b8d3... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: New changeset eb5ce324f724a59c51d7a76d1dd49b550cdf386b by Miss Islington (bot) in branch '3.8': bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) (GH-20098) https://github.com/python/cpython/commit/eb5ce324f724a59c51d7a76d1dd49b550cd... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38872> _______________________________________
participants (5)
-
Ananthakrishnan
-
Cheryl Sabella
-
Joannah Nanjekye
-
Matthias Bussonnier
-
miss-islington