[docs] List tutorial
eliben at gmail.com
Mon May 9 15:00:22 CEST 2011
On Fri, May 6, 2011 at 03:58, Matthew Gilson <mlr54 at cisunix.unh.edu> wrote:
> Perhaps this is nit-picky, but ...
> The documentation says that list.remove(x) removes the first item whose
> value is x. In reality, that method removes the first item whose value
> equals x.
> simple example:
> class test(object):
> def __eq__(self,other):
> return True
> print l #  <<< Empty list. test class instances were removed because
> they equal True, not because they are True!
> Perhaps that is what is meant by whose "value" is x, but I think the
> wording there is a little ambiguous.
I agree it's nit-picky :-)
At the tutorial level, "value is x" is good enough for the readers. Twisting
the tongue to avoid confusion between "is" and "equals" is IMHO unnecessary.
So -1 from me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs