Skip to content

Commit 4a687ea

Browse files
committed
replace fstrings with format for python 3.4,3.5
1 parent 8302d8c commit 4a687ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/past/builtins/misc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def cmp(x, y):
3939
try:
4040
if isinstance(x, numbers.Number) and math.isnan(x):
4141
if not isinstance(y, numbers.Number):
42-
raise TypeError(f'cannot compare float("nan"), {type(y)} with cmp')
42+
raise TypeError('cannot compare float("nan"), {type_y} with cmp'.format(type_y=type(y)))
4343
if isinstance(y, int):
4444
return 1
4545
else:
4646
return -1
4747
if isinstance(y, numbers.Number) and math.isnan(y):
4848
if not isinstance(x, numbers.Number):
49-
raise TypeError(f'cannot compare {type(x)}, float("nan") with cmp')
49+
raise TypeError('cannot compare {type_x}, float("nan") with cmp'.format(type_x=type(x)))
5050
if isinstance(x, int):
5151
return -1
5252
else:

0 commit comments

Comments
 (0)