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

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



commit 8fe58e53919f778e099857ad52815f37a183a023
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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:



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