summaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Utils.py
diff options
context:
space:
mode:
authorAleksandr <[email protected]>2022-02-10 16:47:52 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:52 +0300
commitb05913d1c3c02a773578bceb7285084d2933ae86 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/tools/cython/Cython/Utils.py
parentea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff)
Restoring authorship annotation for Aleksandr <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Utils.py')
-rw-r--r--contrib/tools/cython/Cython/Utils.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/contrib/tools/cython/Cython/Utils.py b/contrib/tools/cython/Cython/Utils.py
index c23e11be30b..d59d67d78b1 100644
--- a/contrib/tools/cython/Cython/Utils.py
+++ b/contrib/tools/cython/Cython/Utils.py
@@ -385,22 +385,22 @@ class LazyStr:
return left + self.callback()
-class OrderedSet(object):
- def __init__(self, elements=()):
- self._list = []
- self._set = set()
- self.update(elements)
- def __iter__(self):
- return iter(self._list)
- def update(self, elements):
- for e in elements:
- self.add(e)
- def add(self, e):
- if e not in self._set:
- self._list.append(e)
- self._set.add(e)
-
-
+class OrderedSet(object):
+ def __init__(self, elements=()):
+ self._list = []
+ self._set = set()
+ self.update(elements)
+ def __iter__(self):
+ return iter(self._list)
+ def update(self, elements):
+ for e in elements:
+ self.add(e)
+ def add(self, e):
+ if e not in self._set:
+ self._list.append(e)
+ self._set.add(e)
+
+
# Class decorator that adds a metaclass and recreates the class with it.
# Copied from 'six'.
def add_metaclass(metaclass):