------------------------------------------------------------
revno: 46
committer: Florian Fuchs <[email protected]>
branch nick: mailman.client
timestamp: Fri 2013-03-22 11:28:16 -0700
message:
  added __len__ to _Page
modified:
  src/mailmanclient/_client.py
  src/mailmanclient/docs/using.txt


--
lp:mailman.client
https://code.launchpad.net/~mailman-coders/mailman.client/trunk

Your team Mailman Coders is subscribed to branch lp:mailman.client.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman.client/trunk/+edit-subscription
=== modified file 'src/mailmanclient/_client.py'
--- src/mailmanclient/_client.py	2013-03-22 01:22:32 +0000
+++ src/mailmanclient/_client.py	2013-03-22 18:28:16 +0000
@@ -892,6 +892,9 @@
     def __repr__(self):
         return '<Page {0} ({1})'.format(self._page, self._model)
 
+    def __len__(self):
+        return len(self._entries)
+
     def _create_page(self):
         self._entries = []
         # create url

=== modified file 'src/mailmanclient/docs/using.txt'
--- src/mailmanclient/docs/using.txt	2013-03-22 01:22:32 +0000
+++ src/mailmanclient/docs/using.txt	2013-03-22 18:28:16 +0000
@@ -148,6 +148,8 @@
     >>> page = client.get_list_page(count=2, page=1)
     >>> page.nr
     1
+    >>> len(page)
+    2
     >>> for m_list in page:
     ...     print m_list
     <List "[email protected]">

_______________________________________________
Mailman-coders mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-coders

Reply via email to