File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/oset.cpython-310.pyc
o
�N�gj � @ s8 d Z ddlmZ ed�ZdZdd� ZG dd� de�ZdS ) a�
Available at repository https://github.com/LuminosoInsight/ordered-set
salt.utils.oset
~~~~~~~~~~~~~~~~
An OrderedSet is a custom MutableSet that remembers its order, so that every
entry has an index that can be looked up.
Based on a recipe originally posted to ActiveState Recipes by Raymond Hettiger,
and released under the MIT license.
Rob Speer's changes are as follows:
- changed the content from a doubly-linked list to a regular Python list.
Seriously, who wants O(1) deletes but O(N) lookups by index?
- add() returns the index of the added item
- index() just returns the index of an item
- added a __getstate__ and __setstate__ so it can be pickled
- added __getitem__
� )�
MutableSetNz2.0.1c C s"