Kaydet (Commit) 9f696c98 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #23075: Whether __builtins__ is a module or a dict is undefined in

CPython. Use the reliably well defined `import __builtin__` instead.
Patch by Alex Gaynor.
üst a8e8f7ee
......@@ -24,6 +24,7 @@ __all__ = (
__version__ = '1.0'
import __builtin__
import inspect
import pprint
import sys
......@@ -32,7 +33,7 @@ from types import ModuleType
from functools import wraps, partial
_builtins = {name for name in __builtins__ if not name.startswith('_')}
_builtins = {name for name in dir(__builtin__) if not name.startswith('_')}
BaseExceptions = (BaseException,)
if 'java' in sys.platform:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment