Warning

Most of the documentation was written prior to version 0.5 and needs to be updated. This work has now started for version 0.7 and we aim to have it completed before version 0.8 is available.

Comparison between Python versions: SyntaxErrors

In this file, we highlight differences between the information given by different versions of Python when it comes to SyntaxError. The content of this file is likely of no use to anyone except for people who write code to include new SyntaxError cases.

The differences between Python versions can be:

  1. The error message itself.

  2. The location of the error as indicated by Python with ^. We’ve decided to leave these out for now.

As a consequence, the information as to what we guess is the cause can be slightly different. So, we also show when we assign a different cause.

Note that the content below is extracted automaticaly by a simple program we wrote for this purpose. If the information is the same for Python 3.6 and 3.7, but changes for Python 3.8, we only show the differences between 3.7 and 3.8.

assign_to_yield_expression
Different messages - from Python
3.7: SyntaxError: can't assign to yield expression

3.8: SyntaxError: cannot assign to yield expression

3.10: SyntaxError: cannot assign to yield expression here. Maybe you meant '==' instead of '='?

quote_inside_string
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: unterminated string literal (detected at line 3)

delete_expression
Different messages - from Python
3.7: SyntaxError: can't delete operator

3.8: SyntaxError: cannot delete operator

3.10: SyntaxError: cannot delete expression

indentation_error_1
Different messages - from Python
3.9: IndentationError: expected an indented block

3.10: IndentationError: expected an indented block after 'if' statement on line 3

print_is_a_function_2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

del_paren_star_2
Different messages - from Python
3.8: SyntaxError: can't use starred expression here

3.9: SyntaxError: cannot delete starred

print_non_paren_non_string1
Different messages - from Python
3.9: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(hello world!)?

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

delete_function_call
Different messages - from Python
3.7: SyntaxError: can't delete function call

3.8: SyntaxError: cannot delete function call

future_import_star
Different explanation - by Friendly-traceback
3.6: When using a `from __future__ import` statement,
you must import specific named features.

The available features are `nested_scopes,
 generators,
 division,
 absolute_import,
 with_statement,
 print_function,
 unicode_literals,
 barry_as_FLUFL,
 generator_stop`.

3.7: When using a `from __future__ import` statement,
you must import specific named features.

The available features are `nested_scopes,
 generators,
 division,
 absolute_import,
 with_statement,
 print_function,
 unicode_literals,
 barry_as_FLUFL,
 generator_stop,
 annotations`.

imaginary_i
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Perhaps you thought that `i` could be used to represent
the square root of `-1`. In Python, the symbol used for this is `j`
and the complex part is written as `some_number` immediately
followed by `j`, with no spaces in between.
Perhaps you meant to write `3.0j`.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

Perhaps you thought that `i` could be used to represent
the square root of `-1`. In Python, the symbol used for this is `j`
and the complex part is written as `some_number` immediately
followed by `j`, with no spaces in between.
Perhaps you meant to write `3.0j`.

print_is_a_function_5
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

would_be_type_declaration_1
Different explanation - by Friendly-traceback
3.7: It looks like you were trying to declare that `start` was
a variable using the word `var`.
However, even if you remove `var`, there would still be some
some syntax errors.

3.8: It looks like you were trying to declare that `start` was
a variable using the word `var`.
If you remove `var`, you will have a valid Python statement.

except_or_finally
Different messages - from Python
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: SyntaxError: expected 'except' or 'finally' block

Different explanation - by Friendly-traceback
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: You wrote a `try` block which did not include an `except` nor a `finally` block.
Perhaps you meant to write either

    except:

or

    finally:
dict_value_missing_3
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: ':' expected after dictionary key

Different explanation - by Friendly-traceback
3.9: It looks like the error occurred as you were writing a Python dict.
Perhaps wrote a dict key without writing the corresponding value.

3.10: It looks like the error occurred as you were writing a Python dict.
Perhaps you wrote a dict key without writing the corresponding value.

missing_comma_in_dict
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

invalid_identifier_5
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid imaginary literal

future_unknown
Different explanation - by Friendly-traceback
3.6: `something` is not a valid feature of module `__future__`.

The available features are `nested_scopes,
 generators,
 division,
 absolute_import,
 with_statement,
 print_function,
 unicode_literals,
 barry_as_FLUFL,
 generator_stop`.

3.7: `something` is not a valid feature of module `__future__`.

The available features are `nested_scopes,
 generators,
 division,
 absolute_import,
 with_statement,
 print_function,
 unicode_literals,
 barry_as_FLUFL,
 generator_stop,
 annotations`.

augmented_assignment_to_literal
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: cannot use assignment expressions with literal

Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: You cannot use the augmented assignment operator `:=`,
sometimes called the walrus operator, with literals like `"word"`.
You can only assign objects to identifiers (variable names).

unescaped_backslash
Different messages - from Python
3.9: SyntaxError: EOL while scanning string literal

3.10: SyntaxError: unterminated string literal (detected at line 1)

hyphen_instead_of_underscore
Different messages - from Python
3.7: SyntaxError: can't assign to operator

3.8: SyntaxError: cannot assign to operator

3.10: SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?

unicode_fraction
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '¾' (U+00BE)

def_forward_slash_2
Different explanation - by Friendly-traceback
3.6: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.6.8.

3.7: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.7.9.

3.8: `/` indicates that the previous arguments in a function definition
are positional arguments.
However, `*` indicates that the arguments
that follow must be keyword arguments.
When they are used together, `/` must appear before `*`.

assignment_expression_cannot_rebind_2
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: comprehension inner loop cannot rebind assignment expression target 'j'

Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: You are using the augmented assignment operator `:=` inside
a comprehension to assign a value to the iteration variable `j`.
This variable is meant to be used only inside the comprehension.
The augmented assignment operator is normally used to assign a value
to a variable so that the variable can be reused later.
This is not possible for variable `j`.

single_equal_with_if
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?

Different explanation - by Friendly-traceback
3.9: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    if i % 2 == 0:
3.10: You wrote an expression that includes some mathematical operations
on the left-hand side of the equal sign which should be
only used to assign a value to a variable.

unclosed_paren_2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: '(' was never closed

assign_to_debug2
Different messages - from Python
3.7: SyntaxError: assignment to keyword

3.8: SyntaxError: cannot assign to __debug__

missing_code_block_2
Different messages - from Python
3.8: SyntaxError: unexpected EOF while parsing

3.9: IndentationError: expected an indented block

3.10: IndentationError: expected an indented block after 'for' statement on line 3

Different explanation - by Friendly-traceback
3.8: Python tells us that it reached the end of the file
and expected more content.


3.9: Line `6` identified above was expected to begin a new indented block.

missing_comma_in_tuple
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

invalid_keyword_argument_2
Different messages - from Python
3.7: SyntaxError: keyword can't be an expression

3.8: SyntaxError: cannot assign to True

3.9: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?

3.10: SyntaxError: cannot assign to True

Different explanation - by Friendly-traceback
3.7: You likely called a function using the Python keyword `True` as an argument:

    a_function(True=something) 

which Python interpreted as trying to assign a value to a Python keyword.

You cannot assign a value to `True`.

3.8: `True` is a constant in Python; you cannot assign it a different value.

3.9: You likely called a function using the Python keyword `True` as an argument:

    a_function(True=something) 

which Python interpreted as trying to assign a value to a Python keyword.

You cannot assign a value to `True`.

3.10: `True` is a constant in Python; you cannot assign it a different value.

assignment_expression_cannot_rebind
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: assignment expression cannot rebind comprehension iteration variable 'i'

Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: You are using the augmented assignment operator `:=` inside
a comprehension to assign a value to the iteration variable `i`.
This variable is meant to be used only inside the comprehension.
The augmented assignment operator is normally used to assign a value
to a variable so that the variable can be reused later.
This is not possible for variable `i`.

keyword_arg_repeated
Different messages - from Python
3.8: SyntaxError: keyword argument repeated

3.9: SyntaxError: keyword argument repeated: ad

comprehension_missing_tuple_paren
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: did you forget parentheses around the comprehension target?

bracket_instead_of_paren
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

Different explanation - by Friendly-traceback
3.9: You used square brackets, `[...]` instead of parentheses.
Write the following instead:

    print(sum(i for i in [1, 2, 3] if i%2==0))
3.10: Python indicates that the error is caused by `[` written immediately after `sum`.
It is possible that you forgot a comma between items in a tuple, 
or between function arguments, 
at the position indicated by ^.
Perhaps you meant to insert an operator like `+, -, *`
between `sum` and `[`.
The following lines of code would not cause any `SyntaxError`:

    print(sum, [i for i in [1, 2, 3] if i%2==0])
    print(sum + [i for i in [1, 2, 3] if i%2==0])
    print(sum - [i for i in [1, 2, 3] if i%2==0])
    print(sum * [i for i in [1, 2, 3] if i%2==0])
Note: these are just some of the possible choices and that
some of them might raise other types of exceptions.

There is an additional possibility.
You used square brackets, `[...]` instead of parentheses.
Write the following instead:

    print(sum(i for i in [1, 2, 3] if i%2==0))
unexpected_eof
Different messages - from Python
3.9: SyntaxError: unexpected EOF while parsing

3.10: SyntaxError: '[' was never closed

Different explanation - by Friendly-traceback
3.9: Python tells us that it reached the end of the file
and expected more content.

I will attempt to be give a bit more information.

The opening square bracket `[` on line 5 is not closed.

    5:     return [1, 2, 3,
                  ^

3.10: The opening square bracket `[` on line 5 is not closed.

    5:     return [1, 2, 3,
                  ^

unicode_quote3
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '‹' (U+2039)

unmatched_closing_bracket_2
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: closing parenthesis ']' does not match opening parenthesis '(' on line 2

dict_value_missing_1
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: ':' expected after dictionary key

Different explanation - by Friendly-traceback
3.9: It looks like the error occurred as you were writing a Python dict.
Perhaps wrote a dict key without writing the corresponding value.

3.10: It looks like the error occurred as you were writing a Python dict.
Perhaps you wrote a dict key without writing the corresponding value.

literal_in_for_loop
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to literal

assign_to_literal_dict
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to dict display

3.10: SyntaxError: cannot assign to dict literal here. Maybe you meant '==' instead of '='?

unicode_fraction3
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '⁄' (U+2044)

except_multiple_exceptions
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: multiple exception types must be parenthesized

Different explanation - by Friendly-traceback
3.9: I am guessing that you wanted to use an `except` statement
with multiple exception types. If that is the case, you must
surround them with parentheses.

3.10: I am guessing that you wanted to use an `except` statement
with multiple exception types. If that is the case, you must
surround them with parentheses.


assign_to_literal_set
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to set display

3.10: SyntaxError: cannot assign to set display here. Maybe you meant '==' instead of '='?

print_non_paren_non_string2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

too_many_parentheses
Different messages - from Python
3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.9: SyntaxError: too many nested parentheses

Different explanation - by Friendly-traceback
3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.9: Your code is too complex for Python:
you need to reduce the number of parentheses
contained inside other parentheses.

typo_in_finally
Different messages - from Python
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: SyntaxError: expected 'except' or 'finally' block

Different explanation - by Friendly-traceback
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: You wrote a `try` block which did not include an `except` nor a `finally` block.
Perhaps you meant to write

    finally:
delete_named_expression
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: cannot delete named expression

Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: You cannot delete the named expression `(a := 5)`.
You can only delete names of objects, or items in mutable containers
such as `list`, `set`, or `dict`.

assign_to_f_string
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to f-string expression

3.10: SyntaxError: cannot assign to f-string expression here. Maybe you meant '==' instead of '='?

Different explanation - by Friendly-traceback
3.7: You wrote an expression that has the f-string `f'{x}'`
on the left-hand side of the equal sign.
An f-string should only appear on the right-hand side of an equal sign.

3.8: You wrote an expression that has the f-string `f'{x}'`
on the left-hand side of the equal sign.
An f-string should only appear on the right-hand side of an equal sign.
You can only assign objects to identifiers (variable names).

missing_comma_in_list
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

invalid_decimal_literal1
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Valid names cannot begin with a number.
Perhaps you forgot a multiplication operator, `1 * f`.


3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

Valid names cannot begin with a number.
Perhaps you forgot a multiplication operator, `1 * f`.


else_if_instead_of_elif
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected ':'

Different explanation - by Friendly-traceback
3.9: You likely meant to use Python's `elif` keyword
but wrote `else if` instead.


3.10: Python told us that it expected a colon at the position indicated.
However, adding a colon or replacing something else by a colon
would not fix the problem.
You likely meant to use Python's `elif` keyword
but wrote `else if` instead.


f_string_assign_value
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
Different explanation - by Friendly-traceback
3.7: You are likely trying to assign a value within an f-string.
This is not allowed.

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
missing_colon_while
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected ':'

assign_to_function_call_3
Different messages - from Python
3.7: SyntaxError: can't assign to function call

3.8: SyntaxError: cannot assign to function call

equal_sign_instead_of_colon
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?

Different explanation - by Friendly-traceback
3.9: It is possible that you used an equal sign `=` instead of a colon `:`
to assign values to keys in a dict
before or at the position indicated by ^.

3.10: You wrote an expression like

    'Alice' = variable_name
where `'Alice'`, on the left-hand side of the equal sign,
is or includes an actual object of type `str`
and is not simply the name of a variable.

You can only assign objects to identifiers (variable names).

It is possible that you used an equal sign `=` instead of a colon `:`
to assign values to keys in a dict.

unpacking_dict_value
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: cannot use a starred expression in a dictionary value

Different explanation - by Friendly-traceback
3.9: You cannot have these two operators, `:` and `*`,
following each other.
It looks like you tried to use a starred expression as a dict value;
this is not allowed.

The following statement has no syntax error:

    {'a': (1, 2, 3)}

3.10: It looks like you tried to use a starred expression as a dict value;
this is not allowed.

The following statement has no syntax error:

    {'a': (1, 2, 3)}

def_forward_slash_3
Different explanation - by Friendly-traceback
3.6: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.6.8.

3.7: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.7.9.

3.8: `/` indicates that the previous arguments in a function definition
are positional arguments.
`*arg` must appear after `/` in a function definition.

cannot_assign_to_attribute_here
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='?

Different explanation - by Friendly-traceback
3.9: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    if x.a == 1:
3.10: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    if x.a == 1:

generator_expression_parens
Different messages - from Python
3.6: SyntaxError: Generator expression must be parenthesized if not sole argument

3.7: SyntaxError: Generator expression must be parenthesized

unmatched_closing_bracket_3
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: unmatched ']'

Different explanation - by Friendly-traceback
3.7: The closing square bracket `]` on line 3 does not match anything.

    3:      3]]
              ^

3.8: The closing square bracket `]` on line 3 does not match anything.

invalid_identifier_2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Valid names cannot begin with a number.
Perhaps you forgot a multiplication operator, `2 * pi`.


3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

Valid names cannot begin with a number.
Perhaps you forgot a multiplication operator, `2 * pi`.


missing_colon_if
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected ':'

print_is_a_function_4
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

dict_value_missing_4
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expression expected after dictionary key and ':'

assign_to_function_call_2
Different messages - from Python
3.7: SyntaxError: can't assign to function call

3.8: SyntaxError: cannot assign to function call

3.10: SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?

would_be_type_declaration_2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

Different explanation - by Friendly-traceback
3.7: It looks like you were trying to declare that `start` was
a variable using the word `var`.
However, even if you remove `var`, there would still be some
some syntax errors.

3.8: It looks like you were trying to declare that `start` was
a variable using the word `var`.
If you remove `var`, you will have a valid Python statement.

3.10: It looks like you were trying to declare that `var` was
a variable using the word `var`.
If you remove `var`, you will have a valid Python statement.

invalid_octal
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: invalid digit '8' in octal literal

assign_to_function_call_1
Different messages - from Python
3.7: SyntaxError: can't assign to function call

3.8: SyntaxError: cannot assign to function call

3.10: SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?

invalid_character_in_identifier
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '🤖' (U+1F916)

assign_to_literal_int_3
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to literal

assign_to_operation
Different messages - from Python
3.7: SyntaxError: can't assign to operator

3.8: SyntaxError: cannot assign to operator

3.10: SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?

def_forward_slash_4
Different explanation - by Friendly-traceback
3.6: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.6.8.

3.7: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.7.9.

3.8: You can only use `/` once in a function definition.

integer_with_leading_zero_1
Different messages - from Python
3.7: SyntaxError: invalid token

3.8: SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

assign_to_conditional
Different messages - from Python
3.7: SyntaxError: can't assign to conditional expression

3.8: SyntaxError: cannot assign to conditional expression

invalid_keyword_argument
Different messages - from Python
3.7: SyntaxError: keyword can't be an expression

3.8: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?

invalid_identifier_4
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid imaginary literal

delete_constant_keyword
Different messages - from Python
3.7: SyntaxError: can't delete keyword

3.8: SyntaxError: cannot delete True

unmatched_closing_curly
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: unmatched '}'

Different explanation - by Friendly-traceback
3.7: The closing curly bracket `}` on line 6 does not match anything.

    6:     3, 4,}}
                 ^

3.8: The closing curly bracket `}` on line 6 does not match anything.

typo_in_except
Different messages - from Python
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: SyntaxError: expected 'except' or 'finally' block

Different explanation - by Friendly-traceback
3.9: Either not a SyntaxError for this Python version, or case excluded for some other reason.
3.10: You wrote a `try` block which did not include an `except` nor a `finally` block.
Perhaps you meant to write

    except Exception:
debug_fstring_not_supported
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
Different explanation - by Friendly-traceback
3.6: You are likely using a 'debug' syntax of f-strings introduced
in Python version 3.8. You are using version 3.6.

3.7: You are likely using a 'debug' syntax of f-strings introduced
in Python version 3.8. You are using version 3.7.

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
assign_to_literal_int_2
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to literal

3.10: SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?

def_missing_colon
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected ':'

Different explanation - by Friendly-traceback
3.9: A function definition statement must end with a colon.

3.10: You wrote a statement beginning with
`def` but forgot to add a colon `:` at the end.


missing_comma_in_set
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Perhaps you forgot a comma?

def_function_name_invalid
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: The name of a function must be a valid Python identifier,
that is a name that begins with a letter or an underscore character, `_`,
and which contains only letters, digits or the underscore character.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

The name of a function must be a valid Python identifier,
that is a name that begins with a letter or an underscore character, `_`,
and which contains only letters, digits or the underscore character.

eol_string_literal
Different messages - from Python
3.9: SyntaxError: EOL while scanning string literal

3.10: SyntaxError: unterminated string literal (detected at line 3)

assign_to_ellipsis
Different messages - from Python
3.7: SyntaxError: can't assign to Ellipsis

3.8: SyntaxError: cannot assign to Ellipsis

3.10: SyntaxError: cannot assign to ellipsis here. Maybe you meant '==' instead of '='?

def_semi_colon_instead_of_colon
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected ':'

Different explanation - by Friendly-traceback
3.9: A function definition statement must end with a colon.
You wrote `;` instead of a colon.

3.10: Python expected a colon at the position indicated.
You wrote `;` instead of a colon.

assign_to_debug
Different messages - from Python
3.7: SyntaxError: assignment to keyword

3.8: SyntaxError: cannot assign to __debug__

delete_string_literal
Different messages - from Python
3.7: SyntaxError: can't delete literal

3.8: SyntaxError: cannot delete literal

unmatched_closing_paren
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: unmatched ')'

Different explanation - by Friendly-traceback
3.7: The closing parenthesis `)` on line 6 does not match anything.

    6:     3, 4,))
                 ^

3.8: The closing parenthesis `)` on line 6 does not match anything.

assign_to_literal_int
Different messages - from Python
3.7: SyntaxError: can't assign to literal

3.8: SyntaxError: cannot assign to literal

3.10: SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?

dict_value_missing_2
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expression expected after dictionary key and ':'

assign_to_keyword_none
Different messages - from Python
3.7: SyntaxError: can't assign to keyword

3.8: SyntaxError: cannot assign to None

cannot_use_double_star
Different messages - from Python
3.8: SyntaxError: invalid syntax

3.9: SyntaxError: f-string: invalid syntax

3.10: SyntaxError: f-string: cannot use double starred expression here

del_paren_star_1
Different messages - from Python
3.9: SyntaxError: can't use starred expression here

3.10: SyntaxError: cannot use starred expression here

augmented_assigment_with_true
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: cannot use assignment expressions with True

Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: `True` is a constant in Python; you cannot assign it a different value.

comprehension_with_condition_no_else
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: expected 'else' after 'if' expression

Different explanation - by Friendly-traceback
3.9: I am guessing that you were writing a comprehension or a generator expression
and use the wrong order for a condition.
The correct order depends if there is an `else` clause or not.
For example, the correct order for a list comprehensions with
condition can be either

    [f(x) if condition else other for x in sequence]  # 'if' before 'for'

or, if there is no `else`

    [f(x) for x in sequence if condition]  # 'if' after 'for'


3.10: An `else some_value` clause was expected after the `if` expression.

unterminated_triple_quote_string
Different messages - from Python
3.9: SyntaxError: EOF while scanning triple-quoted string literal

3.10: SyntaxError: unterminated triple-quoted string literal (detected at line 4)

single_equal_with_elif
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?

Different explanation - by Friendly-traceback
3.9: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    elif i % 2 == 0:
3.10: You wrote an expression that includes some mathematical operations
on the left-hand side of the equal sign which should be
only used to assign a value to a variable.

unicode_quote5
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '‚' (U+201A)

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Did you use copy-paste?
Python indicates that you used the unicode character `‚`
which is not allowed.
I suspect that you used a fancy unicode quotation mark
whose name is SINGLE LOW-9 QUOTATION MARK
instead of a normal single or double quote for a string.
Or perhaps, you meant to write a comma.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

I suspect that you used a fancy unicode quotation mark
whose name is SINGLE LOW-9 QUOTATION MARK.

Perhaps, you meant to write a comma.

assign_instead_of_equal
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?

Different explanation - by Friendly-traceback
3.7: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    a = (b == 2)  # issue #65
3.8: You used an assignment operator `=`; perhaps you meant to use 
an equality operator, `==`, or the walrus operator `:=`.

unicode_quote
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '«' (U+00AB)

unicode_quote2
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '‹' (U+2039)

def_forward_slash_1
Different explanation - by Friendly-traceback
3.6: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.6.8.

3.7: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.7.9.

3.8: `/` indicates that the previous arguments in a function definition
are positional arguments.
You have unspecified keyword arguments that appear before
the symbol `/`.

integer_with_leading_zero_2
Different messages - from Python
3.7: SyntaxError: invalid token

3.8: SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

unclosed_bracket
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: '[' was never closed

unicode_quote4
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '›' (U+203A)

invalid_hexadecimal
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid hexadecimal literal

invalid_identifier_3
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid imaginary literal

unmatched_closing_bracket_1
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: SyntaxError: closing parenthesis ']' does not match opening parenthesis '('

print_is_a_function_3
Different messages - from Python
3.9: SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""This is a very long string which results in a very long error message.""")?

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

def_star_arg_before_slash
Different explanation - by Friendly-traceback
3.6: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.6.8.

3.7: `/` indicates that the previous arguments in a function definition
are positional arguments.
This symbol can only be used with Python versions 3.8.0 or newer.
You are using Python version 3.7.9.

3.8: `/` indicates that the previous arguments in a function definition
are positional arguments.
`*arg` must appear after `/` in a function definition.

assign_to_generator
Different messages - from Python
3.7: SyntaxError: can't assign to generator expression

3.8: SyntaxError: cannot assign to generator expression

print_is_a_function
Different messages - from Python
3.9: SyntaxError: Missing parentheses in call to 'print'. Did you mean print('hello')?

3.10: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

invalid_identifier
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Valid names cannot begin with a number.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

Valid names cannot begin with a number.

scientific_notation_missing_exponent
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Did you mean `1.5e0`?
Perhaps you meant to write `1.5e0` in scientific notation
and forgot the numerical value for the exponent.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

Did you mean `1.5e0`?
Perhaps you meant to write `1.5e0` in scientific notation
and forgot the numerical value for the exponent.

unicode_fraction2
Different messages - from Python
3.8: SyntaxError: invalid character in identifier

3.9: SyntaxError: invalid character '½' (U+00BD)

3.10: SyntaxError: invalid decimal literal

Different explanation - by Friendly-traceback
3.9: Did you use copy-paste?
Python indicates that you used the unicode character `½`
which is not allowed.
You used the unicode character ½ which is known as
VULGAR FRACTION ONE HALF
I suspect that you meant to write the fraction `1/2` instead.

3.10: Python tells us that you have written an invalid number.
However, I think that the problem might be the following.

You used the unicode character ½ which is known as
VULGAR FRACTION ONE HALF
I suspect that you meant to write the fraction `1/2` instead.

single_equal_with_while
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?

Different explanation - by Friendly-traceback
3.7: You likely used an assignment operator `=` instead of an equality operator `==`.
The following statement would not contain a syntax error:

    while a == 1:
3.8: You used an assignment operator `=`; perhaps you meant to use 
an equality operator, `==`, or the walrus operator `:=`.

missing_code_block
Different messages - from Python
3.8: SyntaxError: unexpected EOF while parsing

3.9: IndentationError: expected an indented block

3.10: IndentationError: expected an indented block after 'for' statement on line 3

Different explanation - by Friendly-traceback
3.8: Python tells us that it reached the end of the file
and expected more content.


3.9: Line `4` identified above was expected to begin a new indented block.

walrus_instead_of_equal
Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: You use the augmented assignment operator `:=` where
the normal assignment operator `=` was required.

unclosed_paren_1
Different messages - from Python
3.9: SyntaxError: invalid syntax

3.10: SyntaxError: '(' was never closed

walrus_does_not_exist
Different messages - from Python
3.7: SyntaxError: invalid syntax

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.
Different explanation - by Friendly-traceback
3.6: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.6.

3.7: You appear to be using the operator `:=`, sometimes called
the walrus operator. This operator requires the use of
Python 3.8 or newer. You are using version 3.7.

3.8: Either not a SyntaxError for this Python version, or case excluded for some other reason.