<div dir="ltr"><br><br><div class="gmail_quote">On Sat Feb 21 2015 at 12:15:25 PM Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 20 Feb 2015 14:05:11 +0000<br>
Brett Cannon <<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>> wrote:<br>
> On Thu Feb 19 2015 at 5:52:07 PM Serhiy Storchaka <<a href="mailto:storchaka@gmail.com" target="_blank">storchaka@gmail.com</a>><br>
> wrote:<br>
><br>
> > Different patterns for TypeError messages are used in the stdlib:<br>
> ><br>
> >      expected X, Y found<br>
> >      expected X, found Y<br>
> >      expected X, but Y found<br>
> >      expected X instance, Y found<br>
> >      X expected, not Y<br>
> >      expect X, not Y<br>
> >      need X, Y found<br>
> >      X is required, not Y<br>
> >      Z must be X, not Y<br>
> >      Z should be X, not Y<br>
> ><br>
> > and more.<br>
> ><br>
> > What the pattern is most preferable?<br>
> ><br>
><br>
> My preference is for "expected X, but found Y".<br>
<br>
If we are busy nitpicking, why are we saying "found Y"? Nothing was<br>
*found* by the callee, it just *got* an argument.<br>
<br>
So it should be "expected X, but got Y".<br>
<br>
Personally, I think the "but" is superfluous: the contradiction is<br>
already implied, so "expected X, got Y" is terser and conveys the<br>
meaning just as well.<br></blockquote><div><br></div><div>I'm also fine with the terser version.</div><div><br></div><div>-Brett </div></div></div>