File tree 1 file changed +0
-9
lines changed
1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 16
16
import re
17
17
import decimal
18
18
19
- _DEBUG = False
20
-
21
19
22
20
def int_to_decimal (n ):
23
21
"""Asymptotically fast conversion of an 'int' to Decimal."""
@@ -32,9 +30,6 @@ def int_to_decimal(n):
32
30
# "clever" recursive way. If we want a string representation, we
33
31
# apply str to _that_.
34
32
35
- if _DEBUG :
36
- print ('int_to_decimal' , n .bit_length (), file = sys .stderr )
37
-
38
33
D = decimal .Decimal
39
34
D2 = D (2 )
40
35
@@ -141,8 +136,6 @@ def inner(a, b):
141
136
def int_from_string (s ):
142
137
"""Asymptotically fast version of PyLong_FromString(), conversion
143
138
of a string of decimal digits into an 'int'."""
144
- if _DEBUG :
145
- print ('int_from_string' , len (s ), file = sys .stderr )
146
139
# PyLong_FromString() has already removed leading +/-, checked for invalid
147
140
# use of underscore characters, checked that string consists of only digits
148
141
# and underscores, and stripped leading whitespace. The input can still
@@ -281,8 +274,6 @@ def int_divmod(a, b):
281
274
"""Asymptotically fast replacement for divmod, for 'int'.
282
275
Its time complexity is O(n**1.58), where n = #bits(a) + #bits(b).
283
276
"""
284
- if _DEBUG :
285
- print ('int_divmod' , a .bit_length (), b .bit_length (), file = sys .stderr )
286
277
if b == 0 :
287
278
raise ZeroDivisionError
288
279
elif b < 0 :
You can’t perform that action at this time.
0 commit comments