[Zope3-checkins] CVS: Zope3/src/zope/products/statictree - node.py:1.3

Philipp von Weitershausen philikon at philikon.de
Sun Feb 15 14:28:19 EST 2004


Update of /cvs-repository/Zope3/src/zope/products/statictree
In directory cvs.zope.org:/tmp/cvs-serv20658

Modified Files:
	node.py 
Log Message:
Simplify combination of if/else blocks and use of booleans into one
expression.


=== Zope3/src/zope/products/statictree/node.py 1.2 => 1.3 ===
--- Zope3/src/zope/products/statictree/node.py:1.2	Sun Feb 15 13:59:55 2004
+++ Zope3/src/zope/products/statictree/node.py	Sun Feb 15 14:28:19 2004
@@ -132,10 +132,7 @@
                 # if the node is already expanded, the toggle would
                 # collapse it
                 expanded_nodes.remove(id)
-                if not node is childNodes[-1]:
-                    row_state.append(True)
-                else:
-                    row_state.append(False)
+                row_state.append(not node is childNodes[-1])
             else:
                 # if it isn't expanded, the toggle would expand it
                 expanded_nodes += [id]




More information about the Zope3-Checkins mailing list