Issue #16537: Use the new *default* parameter of max().

This commit is contained in:
Berker Peksag 2014-10-01 05:12:18 +03:00
commit 4256e8ab6d
1 changed files with 1 additions and 3 deletions

View File

@ -263,9 +263,7 @@ class PyBuildExt(build_ext):
for ext in self.extensions:
self.check_extension_import(ext)
longest = 0
if self.extensions:
longest = max([len(e.name) for e in self.extensions])
longest = max([len(e.name) for e in self.extensions], default=0)
if self.failed or self.failed_on_import:
all_failed = self.failed + self.failed_on_import
longest = max(longest, max([len(name) for name in all_failed]))