Skip to content

Commit f07f10b

Browse files
committed
Move sys and traceback imports to top
1 parent 2059e19 commit f07f10b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sortedcontainers/sortedlist.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
# pylint: disable=too-many-lines
1717
from __future__ import print_function
1818

19+
import sys
20+
import traceback
21+
1922
from bisect import bisect_left, bisect_right, insort
2023
from itertools import chain, repeat, starmap
2124
from math import log
@@ -1658,8 +1661,6 @@ def _check(self):
16581661
child_sum = self._index[child] + self._index[child + 1]
16591662
assert child_sum == self._index[pos]
16601663
except:
1661-
import sys
1662-
import traceback
16631664
traceback.print_exc(file=sys.stdout)
16641665
print('len', self._len)
16651666
print('load', self._load)
@@ -2617,8 +2618,6 @@ def _check(self):
26172618
child_sum = self._index[child] + self._index[child + 1]
26182619
assert child_sum == self._index[pos]
26192620
except:
2620-
import sys
2621-
import traceback
26222621
traceback.print_exc(file=sys.stdout)
26232622
print('len', self._len)
26242623
print('load', self._load)

0 commit comments

Comments
 (0)