summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2020-04-04 18:03:04 (GMT)
committerGitHub <noreply@github.com>2020-04-04 18:03:04 (GMT)
commit1ae6445391cc3519733df69a4448059d6eff3c6f (patch)
treed376960eebbb264915f99d46e445fd1110eb512b
parenta1d4dbdfc78e3aed4c245e1810ef24eaa4e744c2 (diff)
downloadcpython-1ae6445391cc3519733df69a4448059d6eff3c6f.zip
cpython-1ae6445391cc3519733df69a4448059d6eff3c6f.tar.gz
cpython-1ae6445391cc3519733df69a4448059d6eff3c6f.tar.bz2
Convert tuples to sets for faster searches (GH-19365)
-rw-r--r--Lib/typing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index 0a685d3..5351883 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1716,11 +1716,11 @@ def _make_nmtuple(name, types):
# attributes prohibited to set in NamedTuple class syntax
-_prohibited = ('__new__', '__init__', '__slots__', '__getnewargs__',
+_prohibited = {'__new__', '__init__', '__slots__', '__getnewargs__',
'_fields', '_field_defaults', '_field_types',
- '_make', '_replace', '_asdict', '_source')
+ '_make', '_replace', '_asdict', '_source'}
-_special = ('__module__', '__name__', '__annotations__')
+_special = {'__module__', '__name__', '__annotations__'}
class NamedTupleMeta(type):