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

Dima Tisnek dimaqq at gmail.com
Tue Jul 14 14:06:14 CEST 2015

https://bugs.python.org/issue21238 introduces detection of
missing/misspelt mock.assert_xxx() calls on getattr level in Python

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

I disagree

Google search for "assret" site:github.com yields 9 hits in total, of which:
1 (cliques.c) is a variable with intended spelling;
1 issue with a warning about the variable above
1 typo in a readme file
1 email address
3 references to this very Python change

Thus the question, how far should Python go to detect possible
erroneous user behaviour?

Granted it is in tests only, but why not detect assrte, sasert, saster
and assrat?

Shouldn't linters and IDEs take care of this anyway?


More information about the Python-Dev mailing list