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

Nick Coghlan ncoghlan at gmail.com
Fri Jul 17 08:37:04 CEST 2015


On 17 July 2015 at 09:35, Alexander <xr.lists at gmail.com> wrote:
>> By the way, I've also been bitten by this several times, so I
>> appreciate the desire to at least warn users (or raise an exception, or
>> whatever).
>
> It is not an intention to make tests more robust. It is the
> implementation, which is questionable at least. I actually still hope
> that the whole thing is a joke.
>
> I do not want to read mistyped code from other developers and try to
> guess whether it will work properly or not.

*Any* operation starting with "assret_*" on a Mock object will throw
AttributeError in 3.5+. The only way to get it to *work* is to spell
it properly.

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.

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list