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

As for the assert misspellings raising AttributeError -- that's not true of all 
of them, only those starting with "assret" or "assert" [1].

In my company, we recently cleaned up a bunch of other assert-misspellings, 
including cases where a real bug was masked in the code by that. That's why I 
filed https://bugs.python.org/issue41877.

IMO, the fact that the assert-misspellings issue is not completely fixed seems 
to increase the motivation to add a module-level assert.

While it's easy to add further misspellings to the check in [1], the general 
solution proposed in this ticket avoids a length whack-a-mole for code owners 
who would be able / willing to switch to a module-level assert.

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

----------
nosy: +vabr2

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

Reply via email to