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

Laurent Peuch cortex at worlddomination.be
Wed Jan 15 10:58:26 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1578581008 -3600
#      Thu Jan 09 15:43:28 2020 +0100
# Node ID 502f48005ecb7e2e8f873e689f9d6862862db38a
# Parent  d32ad44f79253b2b0fac05b5acfc236673ee2a99
# Available At https://hg.logilab.org/users/lpeuch/yams
#              hg pull https://hg.logilab.org/users/lpeuch/yams -r 502f48005ecb
[misc] rename variable to avoid shadowing builtin

diff --git a/yams/buildobjs.py b/yams/buildobjs.py
--- a/yams/buildobjs.py
+++ b/yams/buildobjs.py
@@ -269,11 +269,11 @@ class AbstractTypedAttribute(SubjectRela
             if meta[0].creation_rank < self.creation_rank:
                 iter(meta)
                 previous = self
-                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
 
     def set_vocabulary(self, vocabulary, kwargs=None):
         if kwargs is None:



More information about the cubicweb-devel mailing list