From 1d82a9c383a517c17f9426bbbc061efd41959608 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Wed, 1 Oct 2014 05:11:13 +0300 Subject: [PATCH] Issue #16537: Use the new *default* parameter of max(). --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 6f6da7156c3..277965837c3 100644 --- a/setup.py +++ b/setup.py @@ -252,9 +252,7 @@ class PyBuildExt(build_ext): build_ext.build_extensions(self) - 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: longest = max(longest, max([len(name) for name in self.failed]))