diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-07-11 23:06:06 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-07-11 23:06:06 +0000 |
commit | 5ef96e5fac6f784d3c9336ed0215397e934bff4f (patch) | |
tree | 2eebbec9a29bf21f1ea6e066b6b068a4083ad44c /Lib/ast.py | |
parent | c762242ccad80957e432bbc9563549b7508b0f92 (diff) | |
download | cpython-git-5ef96e5fac6f784d3c9336ed0215397e934bff4f.tar.gz |
allow byte literals
Diffstat (limited to 'Lib/ast.py')
-rw-r--r-- | Lib/ast.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ast.py b/Lib/ast.py index 092f07790f..d595c058b6 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -50,7 +50,7 @@ def literal_eval(node_or_string): if isinstance(node_or_string, Expression): node_or_string = node_or_string.body def _convert(node): - if isinstance(node, Str): + if isinstance(node, (Str, Bytes)): return node.s elif isinstance(node, Num): return node.n |