Single line if statement with a continue

Chris Green cl at isbd.net
Thu Dec 15 03:58:26 EST 2022


Thomas Passin <list1 at tompassin.net> wrote:
>                    I personally tend to use
> 
> if test: return
> 
> even inside larger blocks.

I always try to avoid multiple returns from functions/methods, as soon
as things get complex it's all to easy to miss clean-up etc.

"No multiple returns" is often found in programming guidelines.

-- 
Chris Green
·


More information about the Python-list mailing list