File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2102,8 +2102,8 @@ def __getitem__(
21022102 :return: the value of the field
21032103 """
21042104 try :
2105- # Using | on types in Python 3.9 also raises TypeError, so Union needed.
2106- # as we subsequently catch TypeError
2105+ # Using | on types in Python 3.9 also raises TypeError, so
2106+ # Union is needed, as we subsequently catch TypeError.
21072107 return list .__getitem__ (self , cast (Union [SupportsIndex , slice ], item ))
21082108 except TypeError :
21092109 try :
@@ -2134,8 +2134,6 @@ def __setitem__(
21342134 :param key: Either the position of the value or the name of a field
21352135 :param value: the new value of the field
21362136 """
2137- # Using | on types in Python 3.9 also raises TypeError, so Union needed.
2138- # as we subsequently catch TypeError
21392137 ValidKVTuple = Union [
21402138 tuple [SupportsIndex , RecordValue ], tuple [slice , Iterable [RecordValue ]]
21412139 ]
You can’t perform that action at this time.
0 commit comments