Some more small Python 3 changes

This commit is contained in:
Dave Halter
2020-07-25 02:33:24 +02:00
parent 02eb9b9507
commit 75b467e681
2 changed files with 3 additions and 7 deletions

View File

@@ -62,9 +62,8 @@ _VERSION_TAG = '%s-%s%s-%s' % (
"""
Short name for distinguish Python implementations and versions.
It's like `sys.implementation.cache_tag` but for Python2
we generate something similar. See:
http://docs.python.org/3/library/sys.html#sys.implementation
It's a bit similar to `sys.implementation.cache_tag`.
See: http://docs.python.org/3/library/sys.html#sys.implementation
"""

View File

@@ -117,10 +117,7 @@ def _get_actual_exception(code):
assert False, "The piece of code should raise an exception."
# SyntaxError
if wanted == 'SyntaxError: non-keyword arg after keyword arg':
# The python 3.5+ way, a bit nicer.
wanted = 'SyntaxError: positional argument follows keyword argument'
elif wanted == 'SyntaxError: assignment to keyword':
if wanted == 'SyntaxError: assignment to keyword':
return [wanted, "SyntaxError: can't assign to keyword",
'SyntaxError: cannot assign to __debug__'], line_nr
elif wanted == 'SyntaxError: f-string: unterminated string':