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
........
This commit is contained in:
Benjamin Peterson 2010-07-11 23:10:08 +00:00
parent 16d037653d
commit 902be136be
3 changed files with 4 additions and 1 deletions

View file

@ -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