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

compile and nested scopes #54079

Closed
webcubator mannequin opened this issue Sep 16, 2010 · 2 comments
Closed

compile and nested scopes #54079

webcubator mannequin opened this issue Sep 16, 2010 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@webcubator
Copy link
Mannequin

webcubator mannequin commented Sep 16, 2010

BPO 9870
Nosy @birkenfeld
Files
  • tmp1.py
  • 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:

    assignee = None
    closed_at = <Date 2010-09-16.17:31:21.089>
    created_at = <Date 2010-09-16.08:11:19.951>
    labels = ['type-bug', 'invalid']
    title = 'compile and nested scopes'
    updated_at = <Date 2010-09-16.17:31:21.022>
    user = 'https://bugs.python.org/webcubator'

    bugs.python.org fields:

    activity = <Date 2010-09-16.17:31:21.022>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-16.17:31:21.089>
    closer = 'georg.brandl'
    components = ['None']
    creation = <Date 2010-09-16.08:11:19.951>
    creator = 'webcubator'
    dependencies = []
    files = ['18900']
    hgrepos = []
    issue_num = 9870
    keywords = []
    message_count = 2.0
    messages = ['116515', '116578']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'webcubator']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9870'
    versions = ['Python 3.1', 'Python 2.7']

    @webcubator
    Copy link
    Mannequin Author

    webcubator mannequin commented Sep 16, 2010

    See attached tmp1.py
    It is very simple but it doesn't work
    It raises NameError
    NameError: global name 'arg' is not defined

    @webcubator webcubator mannequin added the type-bug An unexpected behavior, bug, or error label Sep 16, 2010
    @birkenfeld
    Copy link
    Member

    If you want to execute code as in the global namespace, don't supply a separate "locals" dict to eval/exec.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant