aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib-python/3/sre_parse.py')
-rw-r--r--lib-python/3/sre_parse.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib-python/3/sre_parse.py b/lib-python/3/sre_parse.py
index a53735b07d..cb2c4c3281 100644
--- a/lib-python/3/sre_parse.py
+++ b/lib-python/3/sre_parse.py
@@ -406,13 +406,7 @@ def _escape(source, escape, state):
raise source.error("bad escape %s" % escape, len(escape))
def _uniq(items):
- if len(set(items)) == len(items):
- return items
- newitems = []
- for item in items:
- if item not in newitems:
- newitems.append(item)
- return newitems
+ return list(dict.fromkeys(items))
def _parse_sub(source, state, verbose, nested):
# parse an alternation: a|b|c