aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/docs/source
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2016-01-08 12:27:20 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2016-01-08 13:58:33 +0100
commit096c600b96e5d556b67ac01263a1364d0b8e9115 (patch)
tree10a03cbc0fa6e4447d550c2ab388e81e97230446 /bindings/python/docs/source
parente2ecf2b0ebd41257eb82dc1c1ff6d0d970209356 (diff)
python: Remove {Filenames,Threads}.__len__
Remove the __len__ functions, as they exhaust the iterator, breaking 'list(x)'. This is a follow-up to 8866a89e. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Diffstat (limited to 'bindings/python/docs/source')
-rw-r--r--bindings/python/docs/source/filesystem.rst6
-rw-r--r--bindings/python/docs/source/threads.rst8
2 files changed, 11 insertions, 3 deletions
diff --git a/bindings/python/docs/source/filesystem.rst b/bindings/python/docs/source/filesystem.rst
index 4eb78107..a23ae41a 100644
--- a/bindings/python/docs/source/filesystem.rst
+++ b/bindings/python/docs/source/filesystem.rst
@@ -8,7 +8,11 @@ Files and directories
.. autoclass:: Filenames
- .. automethod:: Filenames.__len__
+ .. method:: Filenames.__len__
+ .. warning::
+ :meth:`__len__` was removed in version 0.22 as it exhausted the
+ iterator and broke list(Filenames()). Use `len(list(names))`
+ instead.
:class:`Directoy` -- A directory entry in the database
------------------------------------------------------
diff --git a/bindings/python/docs/source/threads.rst b/bindings/python/docs/source/threads.rst
index e5a8c8a9..4324ac82 100644
--- a/bindings/python/docs/source/threads.rst
+++ b/bindings/python/docs/source/threads.rst
@@ -5,6 +5,10 @@
.. autoclass:: Threads
- .. automethod:: __len__
+ .. method:: __len__
+ .. warning::
+ :meth:`__len__` was removed in version 0.22 as it exhausted the
+ iterator and broke list(Threads()). Use `len(list(msgs))`
+ instead.
- .. automethod:: __str__
+.. automethod:: __str__