File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929import _collections_abc
3030import sys as _sys
31- lazy import copy as _copy
32- lazy import heapq as _heapq
3331
3432_sys .modules ['collections.abc' ] = _collections_abc
3533abc = _collections_abc
3634
35+ lazy from copy import copy as _copy
36+ lazy from heapq import nlargest as _nlargest
3737from itertools import chain as _chain
3838from itertools import repeat as _repeat
3939from itertools import starmap as _starmap
@@ -634,7 +634,7 @@ def most_common(self, n=None):
634634 if n is None :
635635 return sorted (self .items (), key = _itemgetter (1 ), reverse = True )
636636
637- return _heapq . nlargest (n , self .items (), key = _itemgetter (1 ))
637+ return _nlargest (n , self .items (), key = _itemgetter (1 ))
638638
639639 def elements (self ):
640640 '''Iterator over elements repeating each as many times as its count.
@@ -1247,7 +1247,7 @@ def copy(self):
12471247 data = self .data
12481248 try :
12491249 self .data = {}
1250- c = _copy . copy (self )
1250+ c = _copy (self )
12511251 finally :
12521252 self .data = data
12531253 c .update (self )
You can’t perform that action at this time.
0 commit comments