8000 Reintroduced `types.EllipsisType` · python/cpython@00639fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 00639fc

Browse files
author
Bas van Beek
committed
Reintroduced types.EllipsisType
1 parent c322948 commit 00639fc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/test/test_types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,10 @@ def test_or_type_repr(self):
713713
assert repr(int | None) == "int | None"
714714
assert repr(int | typing.GenericAlias(list, int)) == "int | list[int]"
715715

716+
def test_ellipsis_type(self):
717+
self.assertIsInstance(Ellipsis, types.EllipsisType)
718+
719+
716720
class MappingProxyTests(unittest.TestCase):
717721
mappingproxy = types.MappingProxyType
718722

Lib/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,5 +296,6 @@ def wrapped(*args, **kwargs):
296296
GenericAlias = type(list[int])
297297
Union = type(int | str)
298298

299+
EllipsisType = type(Ellipsis)
299300

300301
__all__ = [n for n in globals() if n[:1] != '_']

0 commit comments

Comments
 (0)
0