[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v7gtitty.fsf@yellow.woof>
Date: Thu, 22 Jan 2026 15:51:37 +0100
From: Nam Cao <namcao@...utronix.de>
To: Wander Lairson Costa <wander@...hat.com>, Steven Rostedt
<rostedt@...dmis.org>, Gabriele Monaco <gmonaco@...hat.com>, Wander
Lairson Costa <wander@...hat.com>, open list
<linux-kernel@...r.kernel.org>, "open list:RUNTIME VERIFICATION (RV)"
<linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/26] rv/rvgen: simplify boolean comparison
Wander Lairson Costa <wander@...hat.com> writes:
> Replace explicit boolean comparison with truthiness test in the dot2c
> module. The previous implementation used the redundant pattern of
> comparing a boolean variable directly to False, which is not idiomatic
> Python and adds unnecessary verbosity to the code.
>
> Python's truthiness allows for more concise and readable boolean
> checks. The expression "if not first" is clearer and more Pythonic
> than "if first == False" while maintaining identical semantics. This
> pattern is preferred in PEP 8 and is the standard approach in the
> Python community.
>
> This change continues the ongoing code quality improvements to align
> the codebase with modern Python best practices.
>
> Signed-off-by: Wander Lairson Costa <wander@...hat.com>
Reviewed-by: Nam Cao <namcao@...utronix.de>
Powered by blists - more mailing lists