Skip to content

Commit 1ae6445

Browse files
authored
Convert tuples to sets for faster searches (GH-19365)
1 parent a1d4dbd commit 1ae6445

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/typing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,11 +1716,11 @@ def _make_nmtuple(name, types):
17161716

17171717

17181718
# attributes prohibited to set in NamedTuple class syntax
1719-
_prohibited = ('__new__', '__init__', '__slots__', '__getnewargs__',
1719+
_prohibited = {'__new__', '__init__', '__slots__', '__getnewargs__',
17201720
'_fields', '_field_defaults', '_field_types',
1721-
'_make', '_replace', '_asdict', '_source')
1721+
'_make', '_replace', '_asdict', '_source'}
17221722

1723-
_special = ('__module__', '__name__', '__annotations__')
1723+
_special = {'__module__', '__name__', '__annotations__'}
17241724

17251725

17261726
class NamedTupleMeta(type):

0 commit comments

Comments
 (0)