<div dir="ltr">[Chris Angelico]<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Not about HOW it works. That's irrelevant. You DO need to know about<br>what it does, which is what I said.</blockquote><div> </div><div>So it is. I'm sorry I misread your comment.<br><br>[Chris Angelico]<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In the case of random.choice, that's very clearly defined by its documentation: it chooses a random<br>element from the thing you give it. If you don't know that, you have to look it up to determine whether </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">that's the problem.</blockquote><div><br>I think you're missing the point. The name <font face="monospace, monospace">random.choice </font><font face="arial, helvetica, sans-serif">alone, doesn't fully describe its interface,<br>yet the first time I came across it in code, I didn't feel the need to go look into documentation. I'm betting you<br>could make a pretty good educated guess of the interface of all the functions in the code I wrote above.<br><br>Humans aren't computers. We can and do deal with ambiguity all the time. We can usually make a pretty </font></div><div><font face="arial, helvetica, sans-serif">good guess whether we need to drill down into a function to find a bug even if we don't know EVERYTHING<br>about what the function does. Sometimes that educated guess is wrong and we have to back up and look</font></div></div><div><font face="arial, helvetica, sans-serif">at things we initially thought were irrelevant, but we're not as brittle to ambiguity as you seem to think.<br></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 20, 2019 at 7:35 PM Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Feb 21, 2019 at 12:26 PM Abe Dillon <<a href="mailto:abedillon@gmail.com" target="_blank">abedillon@gmail.com</a>> wrote:<br>
> You don't need to know EVERYTHING about how block_fork works to debug that failure. You<br>
> probably don't need to know EVERYTHING about how random.choice works either. You don't<br>
> need to know about how most of the functions in the code work. The code is not blocking an<br>
> opponent's win. The fault must be in "win" or "opposite".<br>
<br>
Not about HOW it works. That's irrelevant. You DO need to know about<br>
what it does, which is what I said. In the case of random.choice,<br>
that's very clearly defined by its documentation: it chooses a random<br>
element from the thing you give it. If you don't know that, you have<br>
to look it up to determine whether that's the problem.<br>
<br>
ChrisA<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>