Be more explicit in the utils.find example code.

This commit is contained in:
alexandrianlibrarian
2019-12-17 00:15:16 -05:00
committed by Rapptz
parent ab3eab135f
commit def012e281
+1 -1
View File
@@ -180,7 +180,7 @@ def find(predicate, seq):
"""A helper to return the first element found in the sequence """A helper to return the first element found in the sequence
that meets the predicate. For example: :: that meets the predicate. For example: ::
member = find(lambda m: m.name == 'Mighty', channel.guild.members) member = discord.utils.find(lambda m: m.name == 'Mighty', channel.guild.members)
would find the first :class:`~discord.Member` whose name is 'Mighty' and return it. would find the first :class:`~discord.Member` whose name is 'Mighty' and return it.
If an entry is not found, then ``None`` is returned. If an entry is not found, then ``None`` is returned.