Skip to content

The globals argument to eval() should accept frozendict #145055

@rhettinger

Description

@rhettinger
>>> eval('word', globals=frozendict({'word': 'hello'}))
Traceback (most recent call last):
  File "<pyshell#19>", line 1, in <module>
    eval('word', globals=frozendict({'word': 'hello'}))
TypeError: globals must be a real dict; try eval(expr, {}, mapping)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions