Commit 6f962a07 authored by Jason R. Coombs's avatar Jason R. Coombs

Refresh vendored packages (ordereddict 3.1.1)

parent 45b83cd1
......@@ -87,14 +87,14 @@ class OrderedSet(MutableSet, Sequence):
"""
if isinstance(index, slice) and index == SLICE_ALL:
return self.copy()
elif is_iterable(index):
return [self.items[i] for i in index]
elif hasattr(index, "__index__") or isinstance(index, slice):
result = self.items[index]
if isinstance(result, list):
return self.__class__(result)
else:
return result
elif is_iterable(index):
return [self.items[i] for i in index]
else:
raise TypeError("Don't know how to index an OrderedSet by %r" % index)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment