[Python-Dev] How far to go with user-friendliness

David Mertz mertz at gnosis.cx
Fri Jul 17 18:55:14 CEST 2015


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.

On Fri, Jul 17, 2015 at 9:20 AM, Steven D'Aprano <steve at pearwood.info>
wrote:

> On Fri, Jul 17, 2015 at 04:37:04PM +1000, Nick Coghlan wrote:
>
> > The specific typo that is checked is the only one that changes the
> > spelling without also changing the overall length and shape of the
> > word.
>
> I don't think your comment above is correct.
>
>     assert => aasert aseert azzert essert assort
>
> all have the same overall length and shape.
>
> Not all spelling errors are typos (hitting the wrong key). I've seen
> spelling errors this bad, or worse, from native English writers. Poor
> spelling, bad keyboards, distraction, and dyslexia can all contribute.
> And those who aren't fluent in English will make their own spelling
> errors, and may not even notice if the length of the word changes:
>
>     assert => asert
>
> For those who are dyslexic, there are spelling errors and typos that may
> be difficult to tell apart even though the shape of the word changes:
>
>     assert => assery asserh
>
> (perhaps -- I'm not dyslexic, I'm just going by what I've read about
> their experience).
>
> In my opinion, this sets a bad precedent for adding special case after
> special case, and the risk is that people will feel slighted if they are
> told that their typos aren't important enough to be made a special case
> too.
>
> If Michael wishes to argue that this is a useful feature rather than an
> ugly DWIM wart, that's his perogative, but the justification that
> "assret" is the *only* such plausible typo is just plain wrong. We've
> already heard from Robert Collins that he found a bunch of silently
> failing assertions in his mocks, and none of them started with "assret".
>
>
> All-spelling-errors-are-deliberate-to-provide-new-and-exciting-ways-to-spell-old-words-ly
> y'rs,
>
> --
> Steve
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/mertz%40gnosis.cx
>



-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150717/52001c0b/attachment.html>


More information about the Python-Dev mailing list