mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 05:34:51 +08:00
Create some examples for fstring fails.
This commit is contained in:
@@ -69,17 +69,16 @@ A list of syntax/indentation errors I've encountered in CPython.
|
|||||||
"cannot mix bytes and nonbytes literals" # 's' b''
|
"cannot mix bytes and nonbytes literals" # 's' b''
|
||||||
"assignment to yield expression not possible" # x = yield 1 = 3
|
"assignment to yield expression not possible" # x = yield 1 = 3
|
||||||
|
|
||||||
"f-string: empty expression not allowed"
|
"f-string: empty expression not allowed" # f'{}'
|
||||||
"f-string: single '}' is not allowed"
|
"f-string: single '}' is not allowed" # f'}'
|
||||||
"f-string: expressions nested too deeply"
|
"f-string: expressions nested too deeply" # f'{1:{5:{3}}}'
|
||||||
"f-string expression part cannot include a backslash"
|
"f-string expression part cannot include a backslash" # f'{"\"}' or f'{"\\"}'
|
||||||
"f-string expression part cannot include '#'"
|
"f-string expression part cannot include '#'" # f'{#}'
|
||||||
"f-string: unterminated string"
|
"f-string: unterminated string" # f'{"}'
|
||||||
"f-string: mismatched '(', '{', or '['"
|
"f-string: mismatched '(', '{', or '['"
|
||||||
"f-string: invalid conversion character: expected 's', 'r', or 'a'"
|
"f-string: invalid conversion character: expected 's', 'r', or 'a'" # f'{1!b}'
|
||||||
"f-string: expecting '}'"
|
"f-string: unexpected end of string" # Doesn't really happen?!
|
||||||
"f-string: unexpected end of string"
|
"f-string: expecting '}'" # f'{'
|
||||||
"f-string: expecting '}'"
|
|
||||||
"(unicode error) unknown error
|
"(unicode error) unknown error
|
||||||
"(value error) unknown error
|
"(value error) unknown error
|
||||||
"(unicode error) MESSAGE
|
"(unicode error) MESSAGE
|
||||||
|
|||||||
Reference in New Issue
Block a user