summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-10-01 02:12:18 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-10-01 02:12:18 (GMT)
commit4256e8ab6d2cd7849da598a145fcf4e15a83c3b8 (patch)
treebcf6f0792c236c1c579c32a2179a19207450fe81 /setup.py
parent3f612f32f9dd917e4aff04fa4f98f54aa2472b75 (diff)
parent1d82a9c383a517c17f9426bbbc061efd41959608 (diff)
downloadcpython-4256e8ab6d2cd7849da598a145fcf4e15a83c3b8.zip
cpython-4256e8ab6d2cd7849da598a145fcf4e15a83c3b8.tar.gz
cpython-4256e8ab6d2cd7849da598a145fcf4e15a83c3b8.tar.bz2
Issue #16537: Use the new *default* parameter of max().
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index ffc7741..0f88e78 100644
--- a/setup.py
+++ b/setup.py
@@ -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]))