From c620c11e629fb26fa8b554f5c11c66da6f3c2b26 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 4 Mar 2015 09:42:59 +0200 Subject: [PATCH] Issue #23504: Added an __all__ to the types module. --- Lib/types.py | 2 ++ Misc/NEWS | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Lib/types.py b/Lib/types.py index ff90e04973..d414f54931 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -82,3 +82,5 @@ GetSetDescriptorType = type(FunctionType.func_code) MemberDescriptorType = type(FunctionType.func_globals) del sys, _f, _g, _C, _x # Not for export + +__all__ = list(n for n in globals() if n[:1] != '_') diff --git a/Misc/NEWS b/Misc/NEWS index 288a48433b..a211e5d7af 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -18,6 +18,8 @@ Core and Builtins Library ------- +- Issue #23504: Added an __all__ to the types module. + - Issue #23458: On POSIX, the file descriptor kept open by os.urandom() is now set to non inheritable -- 2.50.1