mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
remove support for byte literals; a new feature
This commit is contained in:
parent
7a502de6f8
commit
22dcfccee5
3 changed files with 1 additions and 4 deletions
|
@ -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, Bytes)):
|
||||
if isinstance(node, Str):
|
||||
return node.s
|
||||
elif isinstance(node, Num):
|
||||
return node.n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue