Skip to content

Commit 0a6f5eb

Browse files
committed
TR updates
1 parent d15ca65 commit 0a6f5eb

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

python-formatted-output/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
print(f"{-123456789.8765:G}")
1313
print("{:G}".format(-123456789.8765))
1414

15-
infinite = 1e300 * 1e300
15+
infinite = float("inf")
1616
not_a_number = infinite * 0
1717
print(f"{infinite:g}")
1818
print(f"{not_a_number:g}")

python-formatted-output/interpolation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# print(f"Hello, Pythonista!")
1+
# print(f'Hello, Pythonista!')
22
# print(f"Hello, Pythonista!")
33

4-
# print(f"Single-line f-string with single quotes")
4+
# print(f'Single-line f-string with single quotes')
55
# print(f"Single-line f-string with double quotes")
66
# print(
7-
# f"""Multiline triple-quoted f-string
8-
# with single quotes"""
7+
# f'''Multiline triple-quoted f-string
8+
# with single quotes'''
99
# )
1010
# print(
1111
# f"""Multiline triple-quoted f-string

python-formatted-output/person.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __repr__(self):
1111

1212

1313
jane = Person("Jane", 25)
14-
f"{jane!s}"
15-
f"{jane!r}"
16-
"{jane!s}".format(jane=jane)
17-
"{jane!r}".format(jane=jane)
14+
print(f"{jane!s}")
15+
print(f"{jane!r}")
16+
print("{jane!s}".format(jane=jane))
17+
print("{jane!r}".format(jane=jane))

0 commit comments

Comments
 (0)