Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion datashape/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
def _str_val(s):
# Use the Python parser via the ast module to parse the string,
# since the string_escape and unicode_escape codecs do the wrong thing
return ast.parse('u' + s).body[0].value.s
# mode='single' is necessary since Python 3.7, see:
# https://bugs.python.org/issue32911#msg315581
return ast.parse('u' + s, mode='single').body[0].value.s

# A list of the token names, corresponding regex, and value extraction function
_tokens = [
Expand Down