Commit 76dbb12b authored by Florian Fuchs's avatar Florian Fuchs

added __len__ to _Page

parent d3b176ce
......@@ -892,6 +892,9 @@ class _Page:
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
......
......@@ -148,6 +148,8 @@ List results can be retrieved as pages:
>>> page = client.get_list_page(count=2, page=1)
>>> page.nr
1
>>> len(page)
2
>>> for m_list in page:
... print m_list
<List "test-one@example.com">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment