[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [pytorctl/master] Document a pythonism that briefly confused Aaron and me.



commit 750d7c392766476d12cc9e47bdffffcce84bcdf5
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Tue Oct 4 17:39:44 2011 -0700

    Document a pythonism that briefly confused Aaron and me.
---
 PathSupport.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/PathSupport.py b/PathSupport.py
index d4ffbdd..1e17e48 100644
--- a/PathSupport.py
+++ b/PathSupport.py
@@ -1607,6 +1607,9 @@ class PathBuilder(TorCtl.ConsensusTracker):
             plog("WARN", "Error attaching new stream: "+str(e.args))
             return
           break
+    # This else clause is executed when we go through the circuit
+    # list without finding an entry (or it is empty).
+    # http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
     else:
       circ = None
       try:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits