<div dir="ltr">Nothing huge to add, and I'm not experienced using mock.  But the special handling of 'assret' as a "misspelling of 'assert'" definitely strikes me as a wart also.  That sort of thing really has no place in a library itself, but rather only in a linter.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 17, 2015 at 9:20 AM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Jul 17, 2015 at 04:37:04PM +1000, Nick Coghlan wrote:<br>
<br>
> The specific typo that is checked is the only one that changes the<br>
> spelling without also changing the overall length and shape of the<br>
> word.<br>
<br>
</span>I don't think your comment above is correct.<br>
<br>
    assert => aasert aseert azzert essert assort<br>
<br>
all have the same overall length and shape.<br>
<br>
Not all spelling errors are typos (hitting the wrong key). I've seen<br>
spelling errors this bad, or worse, from native English writers. Poor<br>
spelling, bad keyboards, distraction, and dyslexia can all contribute.<br>
And those who aren't fluent in English will make their own spelling<br>
errors, and may not even notice if the length of the word changes:<br>
<br>
    assert => asert<br>
<br>
For those who are dyslexic, there are spelling errors and typos that may<br>
be difficult to tell apart even though the shape of the word changes:<br>
<br>
    assert => assery asserh<br>
<br>
(perhaps -- I'm not dyslexic, I'm just going by what I've read about<br>
their experience).<br>
<br>
In my opinion, this sets a bad precedent for adding special case after<br>
special case, and the risk is that people will feel slighted if they are<br>
told that their typos aren't important enough to be made a special case<br>
too.<br>
<br>
If Michael wishes to argue that this is a useful feature rather than an<br>
ugly DWIM wart, that's his perogative, but the justification that<br>
"assret" is the *only* such plausible typo is just plain wrong. We've<br>
already heard from Robert Collins that he found a bunch of silently<br>
failing assertions in his mocks, and none of them started with "assret".<br>
<br>
<br>
All-spelling-errors-are-deliberate-to-provide-new-and-exciting-ways-to-spell-old-words-ly y'rs,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Steve<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">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/mertz%40gnosis.cx" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/mertz%40gnosis.cx</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons.  Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br></div>
</div>