summaryrefslogtreecommitdiffstats
path: root/Lib/ast.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-07-11 23:10:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-07-11 23:10:08 (GMT)
commit902be136be37f3d9fe8a301697821c9cc4e57709 (patch)
tree293097eb3fca6a3ccc3dd5725f7fe82a1e4e091b /Lib/ast.py
parent16d037653d50a035f106636715095840e4fabe70 (diff)
downloadcpython-902be136be37f3d9fe8a301697821c9cc4e57709.zip
cpython-902be136be37f3d9fe8a301697821c9cc4e57709.tar.gz
cpython-902be136be37f3d9fe8a301697821c9cc4e57709.tar.bz2
Merged revisions 82828 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82828 | benjamin.peterson | 2010-07-11 18:06:06 -0500 (Sun, 11 Jul 2010) | 1 line allow byte literals ........
Diffstat (limited to 'Lib/ast.py')
-rw-r--r--Lib/ast.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ast.py b/Lib/ast.py
index 0b8baf7..027302f 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