Skip to content

Commit 7278305

Browse files
author
Guido van Rossum
committed
Merge typing.py 3.5->3.6 (Text, ItemsView).
2 parents 6a2dc1b + 0e0563c commit 7278305

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/typing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
'no_type_check',
6666
'no_type_check_decorator',
6767
'overload',
68+
'Text',
6869
]
6970

7071
# The pseudo-submodules 're' and 'io' are part of the public
@@ -1519,7 +1520,7 @@ class KeysView(MappingView[KT], AbstractSet[KT],
15191520

15201521

15211522
class ItemsView(MappingView[Tuple[KT, VT_co]],
1522-
Set[Tuple[KT, VT_co]],
1523+
AbstractSet[Tuple[KT, VT_co]],
15231524
Generic[KT, VT_co],
15241525
extra=collections_abc.ItemsView):
15251526
pass
@@ -1592,6 +1593,10 @@ def NamedTuple(typename, fields):
15921593
return cls
15931594

15941595

1596+
# Python-version-specific alias (Python 2: unicode; Python 3: str)
1597+
Text = str
1598+
1599+
15951600
class IO(Generic[AnyStr]):
15961601
"""Generic base class for TextIO and BinaryIO.
15971602

0 commit comments

Comments
 (0)