This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vabr2
Recipients cjw296, lisroach, mariocj89, michael.foord, rbcollins, rhettinger, terry.reedy, vabr2, veky, xtreak
Date 2020-10-13.17:10:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602609031.31.0.590339947694.issue41877@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-10-13 17:10:31vabr2setrecipients: + vabr2, rhettinger, terry.reedy, rbcollins, cjw296, michael.foord, veky, lisroach, mariocj89, xtreak
2020-10-13 17:10:31vabr2setmessageid: <1602609031.31.0.590339947694.issue41877@roundup.psfhosted.org>
2020-10-13 17:10:31vabr2linkissue41877 messages
2020-10-13 17:10:31vabr2create