Clean-up documentation to use NumPy style docs on remaining classes.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user