<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8000001907349px">If people do misspell it, I think they do learn not to in after it happens a few times.</span></blockquote><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Unless the line silently executes and they don't notice the mistake for years :'(</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 14, 2015 at 9:15 AM, Ron Adam <span dir="ltr"><<a href="mailto:ron3200@gmail.com" target="_blank">ron3200@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 07/14/2015 09:41 AM, Steven D'Aprano wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Tue, Jul 14, 2015 at 02:06:14PM +0200, Dima Tisnek wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><a href="https://bugs.python.org/issue21238" rel="noreferrer" target="_blank">https://bugs.python.org/issue21238</a>  introduces detection of<br>
>missing/misspelt mock.assert_xxx() calls on getattr level in Python<br>
>3.5<br>
><br>
>Michael and Kushal are of the opinion that "assret" is a common typo<br>
>of "assert" and should be supported in a sense that it also triggers<br>
>AttributeError and is not silently ignored like a mocked user<br>
>attribute.<br>
><br>
>I disagree<br>
</blockquote>
I must admit I don't use mock so don't quite understand what is going on<br>
in this bug report. But I don't imagine that anything good will come out<br></span>
of treating*one*  typo differently from all the other possible typos.<span class=""><br>
Why should "assret" be treated differently from other easy-to-make typos<br>
like "asert", "assrt", "asset"? Or "assort", which is not only a<br>
standard and common English word, but "e" and "o" are right next to each<br>
other on Dvorak keyboards, making it an easy typo to make.<br>
<br>
Surely this is an obvious case where the Zen should apply. "Special<br>
cases aren't special enough..." -- either all such typos raise<br>
AttributeError, or they are all silent.<br>
</span></blockquote>
<br>
I agree with Steven that it doesn't seem correct to not raise AttributeError here.<br>
<br>
For what it's worth, I have a life long sleep disorder and am a tarrable (<-- like this)  speller because of it.   I still don't want spell, or grammar, checkers to not report my mistakes.  And I don't recall ever making the particular error of using "assret" in place of "assert".  I'd be more likely to mispell it as "assirt" if I wasn't already so familiar with "assert".<br>
<br>
If people do misspell it, I think they do learn not to in after it happens a few times.<br>
<br>
Regards,<br>
   Ron<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/bobcatfish%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/bobcatfish%40gmail.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Christie Wilson</div></div>
</div>