[New-bugs-announce] [issue37001] symtable.symtable doesn't accept bytes which leads to a mismatch from compile()
Dino Viehland
report at bugs.python.org
Tue May 21 17:01:35 EDT 2019
New submission from Dino Viehland <dinoviehland at gmail.com>:
symtable is useful when combined with compile() to AST to understand what the names bind to. But symtable.symtable() doesn't accept a bytes object, while compile does. Ultimately these feed down to the same API, and could easily lead to subtle mismatches due to encodings.
The workaround seems to be to use the tokenize.detect_encoding to discover the encoding and then do the encoding from Python, but this seems wasteful.
----------
assignee: dino.viehland
components: Library (Lib)
messages: 343096
nosy: dino.viehland
priority: normal
severity: normal
status: open
title: symtable.symtable doesn't accept bytes which leads to a mismatch from compile()
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37001>
_______________________________________
More information about the New-bugs-announce
mailing list