[Patchew-devel] [PATCH] Refactoring of UpdateProjectHeadView.handle()

Shubham Jain shubhamjain7495 at gmail.com
Wed May 23 19:16:45 UTC 2018


> As an additional cleanup, the for loop in change_merge_status could be
> written
>
>     for p in series.get_patches():
>         if not p.is_merged:
>             break
>     else:
>         series.is_merged = True
>         series.save()

Wow, I didn't know else clause could be used with a loop as well. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/patchew-devel/attachments/20180524/2f37c5a9/attachment.htm>


More information about the Patchew-devel mailing list