Václav Brožek <v...@google.com> added the comment:

Thank you all for the informative replies (and sorry for my long silence, I was 
sick).

I agree that the general solution (module-level assert) is worth doing, and I 
just added the current motivation to https://bugs.python.org/issue24651.

I still think that the cost associated with bad misspellings compared to the 
effort to extend the existing solution (adding patterns to [1]) is strongly in 
favour of extending the solution: the recent clean-up we had cost us many hours 
of work and involved several people (especially cases with potential or real 
bugs being discovered after the fixed typos). Adding a pattern to [1] seems 
much cheaper than the cost it saves.

The general solution is unlikely to be implemented soon, and even once it is, 
migrating existing code to use it seems unrealistic from the cost perspective. 
That's why I think that adding the newly found patterns to [1] makes sense.


[1] https://github.com/python/cpython/blob/master/Lib/unittest/mock.py#L634

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41877>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to