summaryrefslogtreecommitdiffstats
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-09-25 21:14:03 (GMT)
committerGitHub <noreply@github.com>2024-09-25 21:14:03 (GMT)
commit17a544b257ee3aeaa525350717ee56fd409d9c08 (patch)
treef95619d160ac984403339ca67b25fabfc4eb97da /Lib/copy.py
parent9d8f2d8e08336695fdade5846da4bbcc3eb5f152 (diff)
downloadcpython-17a544b257ee3aeaa525350717ee56fd409d9c08.zip
cpython-17a544b257ee3aeaa525350717ee56fd409d9c08.tar.gz
cpython-17a544b257ee3aeaa525350717ee56fd409d9c08.tar.bz2
gh-119180: Avoid going through AST and eval() when possible in annotationlib (#124337)
Often, ForwardRefs represent a single simple name. In that case, we can avoid going through the overhead of creating AST nodes and code objects and calling eval(): we can simply look up the name directly in the relevant namespaces. Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/copy.py')
0 files changed, 0 insertions, 0 deletions