Commit af2406f2 authored by Tarek Ziadé's avatar Tarek Ziadé

Issue #6545: Removed assert statements in distutils.Extension, so the behavior...

Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O
parent bee2e189
...@@ -103,10 +103,11 @@ class Extension: ...@@ -103,10 +103,11 @@ class Extension:
optional=None, optional=None,
**kw # To catch unknown keywords **kw # To catch unknown keywords
): ):
assert isinstance(name, str), "'name' must be a string" if not isinstance(name, str):
assert (isinstance(sources, list) and raise AssertionError("'name' must be a string")
all(isinstance(v, str) for v in sources)), \ if not (isinstance(sources, list) and
"'sources' must be a list of strings" all(isinstance(v, str) for v in sources)):
raise AssertionError("'sources' must be a list of strings")
self.name = name self.name = name
self.sources = sources self.sources = sources
......
...@@ -349,6 +349,9 @@ Core and Builtins ...@@ -349,6 +349,9 @@ Core and Builtins
Library 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. - 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 - Issue #6431: Make Fraction type return NotImplemented when it doesn't
......
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