[tor-commits] [bridgedb/master] Add docstring for bridgedb.Bridges.BridgeRing.getBridges().

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:35 UTC 2014


commit 8fe58e53919f778e099857ad52815f37a183a023
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sun Jan 12 01:19:50 2014 +0000

    Add docstring for bridgedb.Bridges.BridgeRing.getBridges().
---
 lib/bridgedb/Bridges.py |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 504d33b..2d9dd11 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -843,7 +843,19 @@ class BridgeRing(BridgeHolder):
         return r
 
     def getBridges(self, pos, N=1, countryCode=None):
-        """Return the N bridges appearing in the ring after position pos"""
+        """Return **N** bridges appearing in this hashring after a position.
+
+        :param bytes pos: The position to jump to. Any bridges returned will
+                          start at this position in the hashring, if there is
+                          a bridge assigned to that position. Otherwise,
+                          indexing will start at the first position after this
+                          one which has a bridge assigned to it.
+        :param int N: The number of bridges to return.
+        :type countryCode: str or None
+        :param countryCode: DOCDOC
+        :rtype: list
+        :returns: A list of :class:`~bridgedb.Bridges.Bridge`s.
+        """
         forced = []
         for _,_,count,subring in self.subrings:
             if len(subring) < count:





More information about the tor-commits mailing list