[PATCH 3 of 9 yams V2] [misc] rename variable to avoid shadowing builtin

Nicolas Chauvat nicolas.chauvat at logilab.fr
Wed Jan 15 12:20:30 CET 2020


On Wed, Jan 15, 2020 at 10:58:26AM +0100, Laurent Peuch wrote:
> -                for next in meta:
> -                    if previous.creation_rank < next.creation_rank:
> +                for next_ in meta:
> +                    if previous.creation_rank < next_.creation_rank:
>                          break
> -                    previous.creation_rank, next.creation_rank = next.creation_rank, previous.creation_rank
> -                    next = previous
> +                    previous.creation_rank, next_.creation_rank = next_.creation_rank, previous.creation_rank
> +                    next_ = previous

wouldn't '_next' be more readable than 'next_' ?

and maybe use '_previous' for consistency ?

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  



More information about the cubicweb-devel mailing list