mirror of https://github.com/mahmoud/boltons.git
independence and python 3 compat for setutils
This commit is contained in:
parent
86134aefe4
commit
cace0fd859
|
@ -16,7 +16,6 @@ from bisect import bisect_left
|
||||||
from itertools import chain, islice
|
from itertools import chain, islice
|
||||||
from collections import MutableSet
|
from collections import MutableSet
|
||||||
import operator
|
import operator
|
||||||
from .compat import lrange
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from compat import make_sentinel
|
from compat import make_sentinel
|
||||||
|
@ -47,7 +46,7 @@ class IndexedSet(MutableSet):
|
||||||
Args:
|
Args:
|
||||||
other (iterable): An optional iterable used to initialize the set.
|
other (iterable): An optional iterable used to initialize the set.
|
||||||
|
|
||||||
>>> x = IndexedSet(lrange(4) + lrange(8))
|
>>> x = IndexedSet(list(range(4)) + list(range(8)))
|
||||||
>>> x
|
>>> x
|
||||||
IndexedSet([0, 1, 2, 3, 4, 5, 6, 7])
|
IndexedSet([0, 1, 2, 3, 4, 5, 6, 7])
|
||||||
>>> x - set(range(2))
|
>>> x - set(range(2))
|
||||||
|
|
Loading…
Reference in New Issue