forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrings_new.py
More file actions
30 lines (30 loc) · 772 Bytes
/
strings_new.py
File metadata and controls
30 lines (30 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if 1:
fr"this is not a unicode escape but an interpolation: \N{AMPERSAND}"
if 2:
f'also an interpolation: \\N{AMPERSAND}'
if 3:
f'\\Nspam'
if 4:
f"this is a unicode escape: \N{AMPERSAND}"
if 5:
r"this is also not a unicode escape: \N{AMPERSAND}"
if 6:
'\\N{AMPERSAND}'
if 7:
'\\Nspam'
if 8:
"this is also also a unicode escape: \N{AMPERSAND}"
if 9:
rb"this is also not a unicode escape: \N{AMPERSAND}"
if 10:
b'\\N{AMPERSAND}'
if 11:
b'\\Nspam'
if 12:
b"this is not a unicode escape because we are in a bytestring: \N{AMPERSAND}"
if 13:
fr"""quotes before interpolation "{0}" are okay."""
if 14:
fr"""backslash before an interpolation \{1}\ are okay."""
if 15:
f"Yield inside an f-string: {yield 5} is allowed."