From 41c6a894dc2d0ccfec2562215d2acd996a614ee8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 10 Mar 2024 13:06:00 +0100 Subject: [PATCH] gnulib-tool.py: One more comment regarding coding style. * pygnulib/main.py: Add comment regarding conditional expressions. --- ChangeLog | 5 +++++ pygnulib/main.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3c3a8cfb96..5e1f44993d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-03-10 Bruno Haible + + gnulib-tool.py: One more comment regarding coding style. + * pygnulib/main.py: Add comment regarding conditional expressions. + 2024-03-09 Collin Funk gnulib-tool.py: Follow gnulib-tool changes, part 50. diff --git a/pygnulib/main.py b/pygnulib/main.py index 58d4cd268e..97ff76957a 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -34,6 +34,9 @@ # Use 'is' and 'is not' for variables which can contain only class instances # (e.g. GLModule instances) and None. # Rationale: +# - Avoid conditional expressions as in PEP 308 . +# Rationale: They violate the principle that in conditional code, the +# condition comes first. # You can use this command to check the style: # $ pycodestyle *.py -- 2.39.5