We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8302d8c commit 4a687eaCopy full SHA for 4a687ea
src/past/builtins/misc.py
@@ -39,14 +39,14 @@ def cmp(x, y):
39
try:
40
if isinstance(x, numbers.Number) and math.isnan(x):
41
if not isinstance(y, numbers.Number):
42
- raise TypeError(f'cannot compare float("nan"), {type(y)} with cmp')
+ raise TypeError('cannot compare float("nan"), {type_y} with cmp'.format(type_y=type(y)))
43
if isinstance(y, int):
44
return 1
45
else:
46
return -1
47
if isinstance(y, numbers.Number) and math.isnan(y):
48
if not isinstance(x, numbers.Number):
49
- raise TypeError(f'cannot compare {type(x)}, float("nan") with cmp')
+ raise TypeError('cannot compare {type_x}, float("nan") with cmp'.format(type_x=type(x)))
50
if isinstance(x, int):
51
52
0 commit comments