cosmetics (make it easier to read)

parent 800bdf11
...@@ -1258,14 +1258,17 @@ def old_tests(): ...@@ -1258,14 +1258,17 @@ def old_tests():
>>> def checkContext(self, o): >>> def checkContext(self, o):
... # Python equivalent to aq_inContextOf ... # Python equivalent to aq_inContextOf
... from Acquisition import aq_base, aq_parent, aq_inner ... from Acquisition import aq_base, aq_parent, aq_inner
... subob = self ... next = self
... o = aq_base(o) ... o = aq_base(o)
... while 1: ... while 1:
... if aq_base(subob) is o: return 1 ... if aq_base(next) is o:
... self = aq_inner(subob) ... return 1
... if self is None: break ... self = aq_inner(next)
... subob = aq_parent(self) ... if self is None:
... if subob is None: break ... break
... next = aq_parent(self)
... if next is None:
... break
>>> checkContext(b.c, b) >>> checkContext(b.c, b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment