Clean-up documentation to use NumPy style docs on remaining classes.

This commit is contained in:
Rapptz
2015-12-16 22:20:54 -05:00
parent de1c74a399
commit 9f92536441
4 changed files with 35 additions and 42 deletions

View File

@ -58,15 +58,20 @@ def find(predicate, seq):
member = find(lambda m: m.name == 'Mighty', channel.server.members)
would find the first :class:`Member` whose name is 'Mighty' and return it.
If an entry is not found, then ``None`` is returned.
This is different from `filter`_ due to the fact it stops the moment it finds
a valid entry.
.. _filter: https://docs.python.org/3.6/library/functions.html#filter
:param predicate: A function that returns a boolean-like result.
:param seq: The sequence to iterate through.
:return: The first result of the predicate that returned a ``True``-like value or ``None`` if nothing was found.
Parameters
-----------
predicate
A function that returns a boolean-like result.
seq : iterable
The iterable to search through.
"""
for element in seq: