diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2016-01-08 12:27:20 +0100 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2016-01-08 13:58:33 +0100 |
| commit | 096c600b96e5d556b67ac01263a1364d0b8e9115 (patch) | |
| tree | 10a03cbc0fa6e4447d550c2ab388e81e97230446 /bindings/python/docs | |
| parent | e2ecf2b0ebd41257eb82dc1c1ff6d0d970209356 (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')
| -rw-r--r-- | bindings/python/docs/source/filesystem.rst | 6 | ||||
| -rw-r--r-- | bindings/python/docs/source/threads.rst | 8 |
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__ |
