Skip to content

Commit e574e5d

Browse files
committed
-
1 parent 7e4ae70 commit e574e5d

File tree

7 files changed

+12
-629
lines changed

7 files changed

+12
-629
lines changed

python_toolbox/nifty_collections/counter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# forked from Python 2.7
22

3-
from python_toolbox.third_party.abcs_collection import Mapping
3+
from collections import Mapping
44
from operator import itemgetter as _itemgetter, eq as _eq
55
import heapq as _heapq
66
from itertools import (repeat as _repeat, chain as _chain,

python_toolbox/nifty_collections/lazy_tuple.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import threading
1313
import collections
14-
from python_toolbox.third_party import abcs_collection
1514

1615
from python_toolbox import cute_iter_tools
1716
from python_toolbox import decorator_tools
@@ -52,7 +51,7 @@ def _with_lock(method, *args, **kwargs):
5251
return method(*args, **kwargs)
5352

5453

55-
class LazyTuple(abcs_collection.Sequence, object):
54+
class LazyTuple(collections.Sequence, object):
5655
'''
5756
A lazy tuple which requests as few values as possible from its iterator.
5857

python_toolbox/nifty_collections/ordered_set.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
'''
99
# todo: revamp
1010

11-
from python_toolbox.third_party import abcs_collection
12-
11+
import collections
1312

1413
KEY, PREV, NEXT = range(3)
1514

1615

17-
class OrderedSet(abcs_collection.MutableSet):
16+
class OrderedSet(collections.MutableSet):
1817
'''
1918
A set with an order.
2019

python_toolbox/sequence_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
'''Defines various tools for manipulating sequences.'''
55

6+
import collections
67
import types
78
import itertools
89

910
from python_toolbox.nifty_collections import Counter
1011
from python_toolbox import math_tools
11-
from python_toolbox.third_party import abcs_collection
1212

1313

1414
infinity = float('inf')
@@ -153,18 +153,18 @@ def partitions(sequence, partition_size=None, n_partitions=None,
153153

154154
def is_sequence(thing):
155155
'''Is `thing` a sequence, like `list` or `tuple`?'''
156-
return abcs_collection.Sequence.__instancecheck__(thing)
156+
return collections.Sequence.__instancecheck__(thing)
157157

158158

159159
def is_mutable_sequence(thing):
160160
'''Is `thing` a mutable sequence, like `list`?'''
161-
return abcs_collection.MutableSequence.__instancecheck__(thing)
161+
return collections.MutableSequence.__instancecheck__(thing)
162162

163163

164164
def is_immutable_sequence(thing):
165165
'''Is `thing` an immutable sequence, like `tuple`?'''
166-
return abcs_collection.Sequence.__instancecheck__(thing) and not \
167-
abcs_collection.MutableSequence.__instancecheck__(thing)
166+
return collections.Sequence.__instancecheck__(thing) and not \
167+
collections.MutableSequence.__instancecheck__(thing)
168168

169169

170170
def parse_slice(s):

0 commit comments

Comments
 (0)