[New-bugs-announce] [issue24876] distutils.errors not wildcard-import-safe
Jakub Wilk
report at bugs.python.org
Sun Aug 16 13:34:52 CEST 2015
New submission from Jakub Wilk:
Docstring of the distutils.errors module reads:
This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".
But in reality, the module exports also names that don't start with "Distutils":
>>> ns = {}
>>> exec('from distutils.errors import *', {}, ns)
>>> [k for k in ns.keys() if not k.startswith('Distutils')]
['LibError', 'UnknownFileError', 'LinkError', 'CompileError', 'CCompilerError', 'PreprocessError']
----------
components: Distutils
messages: 248680
nosy: dstufft, eric.araujo, jwilk
priority: normal
severity: normal
status: open
title: distutils.errors not wildcard-import-safe
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24876>
_______________________________________
More information about the New-bugs-announce
mailing list