Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O

This commit is contained in:
Tarek Ziadé 2009-07-22 08:55:19 +00:00
parent bee2e1897b
commit af2406f215
2 changed files with 8 additions and 4 deletions

View File

@ -103,10 +103,11 @@ class Extension:
optional=None,
**kw # To catch unknown keywords
):
assert isinstance(name, str), "'name' must be a string"
assert (isinstance(sources, list) and
all(isinstance(v, str) for v in sources)), \
"'sources' must be a list of strings"
if not isinstance(name, str):
raise AssertionError("'name' must be a string")
if not (isinstance(sources, list) and
all(isinstance(v, str) for v in sources)):
raise AssertionError("'sources' must be a list of strings")
self.name = name
self.sources = sources

View File

@ -349,6 +349,9 @@ Core and Builtins
Library
-------
- Issue #6545: Removed assert statements in distutils.Extension, so the
behavior is similar when used with -O.
- unittest has been split up into a package. All old names should still work.
- Issue #6431: Make Fraction type return NotImplemented when it doesn't