> > If people do misspell it, I think they do learn not to in after it happens > a few times.
Unless the line silently executes and they don't notice the mistake for years :'( On Tue, Jul 14, 2015 at 9:15 AM, Ron Adam <ron3...@gmail.com> wrote: > > > On 07/14/2015 09:41 AM, Steven D'Aprano wrote: > >> On Tue, Jul 14, 2015 at 02:06:14PM +0200, Dima Tisnek wrote: >> >>> >https://bugs.python.org/issue21238 introduces detection of >>> >missing/misspelt mock.assert_xxx() calls on getattr level in Python >>> >3.5 >>> > >>> >Michael and Kushal are of the opinion that "assret" is a common typo >>> >of "assert" and should be supported in a sense that it also triggers >>> >AttributeError and is not silently ignored like a mocked user >>> >attribute. >>> > >>> >I disagree >>> >> I must admit I don't use mock so don't quite understand what is going on >> in this bug report. But I don't imagine that anything good will come out >> of treating*one* typo differently from all the other possible typos. >> Why should "assret" be treated differently from other easy-to-make typos >> like "asert", "assrt", "asset"? Or "assort", which is not only a >> standard and common English word, but "e" and "o" are right next to each >> other on Dvorak keyboards, making it an easy typo to make. >> >> Surely this is an obvious case where the Zen should apply. "Special >> cases aren't special enough..." -- either all such typos raise >> AttributeError, or they are all silent. >> > > I agree with Steven that it doesn't seem correct to not raise > AttributeError here. > > 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". > > If people do misspell it, I think they do learn not to in after it happens > a few times. > > Regards, > Ron > > > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/bobcatfish%40gmail.com > -- Christie Wilson
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com