Skip to content

Commit

Permalink
Nicer wording in LazyList.index docstring
Browse files Browse the repository at this point in the history
`other`?! I must have been high or something
  • Loading branch information
DasIch committed Mar 12, 2011
1 parent 9f5621d commit e24b8d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions brownie/datastructures/sequences.py
Expand Up @@ -203,14 +203,16 @@ def count(self, object):
"""
return self._collected_data.count(object)

def index(self, other):
def index(self, object):
"""
Returns first index of the `other` in list
Returns first index of the `object` in list
This method exhausts the internal iterator up until the given `object`.
"""
for i, obj in enumerate(self):
if obj == other:
if obj == object:
return i
raise ValueError('%s not in LazyList' % other)
raise ValueError('%s not in LazyList' % object)

def __getitem__(self, i):
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/api/datastructures.rst
Expand Up @@ -59,7 +59,7 @@ Sequences
---------

.. autoclass:: LazyList
:members: factory, count, insert, pop, remove, reverse, sort
:members: factory, count, index, insert, pop, remove, reverse, sort

.. autoclass:: CombinedSequence
:members:
Expand Down

0 comments on commit e24b8d5

Please sign in to comment.