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

Laurent Peuch cortex at worlddomination.be
Tue Jan 14 14:18:18 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 cc77829bc52a1631417c0c7ee28bfa4754a5e535
# Parent  5321a3215c8a6edac7489609012683717d15d7ed
# Available At https://hg.logilab.org/users/lpeuch/yams
#              hg pull https://hg.logilab.org/users/lpeuch/yams -r cc77829bc52a
[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
@@ -257,11 +257,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