<div dir="ltr"><br><br><div class="gmail_quote">On Fri, May 6, 2011 at 03:58, Matthew Gilson <span dir="ltr">&lt;<a href="mailto:mlr54@cisunix.unh.edu">mlr54@cisunix.unh.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

at:<br>
<a href="http://docs.python.org/release/2.6/tutorial/datastructures.html#more-on-lists" target="_blank">http://docs.python.org/release/2.6/tutorial/datastructures.html#more-on-lists</a><br>
Perhaps this is nit-picky, but ...<br>
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.<br>
<br>
simple example:<br>
class test(object):<br>
   def __eq__(self,other):<br>
      return True<br>
<br>
l=[test(),test()]<br>
l.remove(True)<br>
l.remove(True)<br>
print l # [] &lt;&lt;&lt; Empty list.  test class instances were removed because they equal True, not because they are True!<br>
<br>
Perhaps that is what is meant by whose &quot;value&quot; is x, but I think the wording there is a little ambiguous.<br></blockquote></div><br>I agree it&#39;s nit-picky :-)<br><br>At the tutorial level, &quot;value is x&quot; is good enough for the readers. Twisting the tongue to avoid confusion between &quot;is&quot; and &quot;equals&quot; is IMHO unnecessary.<br>

<br>So -1 from me.<br><br>Eli<br><br></div>