[issue34880] About the "assert" bytecode
Steven D'Aprano
report at bugs.python.org
Wed Oct 3 06:01:33 EDT 2018
Steven D'Aprano <steve+python at pearwood.info> added the comment:
On Wed, Oct 03, 2018 at 09:49:06AM +0000, thautwarm wrote:
> Steven, this problem is quite interesting because it just allows users
> to cause fatal errors without any invalid operations.
How is that different from every other case of shadowing a builtin?
len = 45
print(len("hello world"))
The ability to shadow builtins is a feature, not a bug.
I have no specific objection to changing assert so that it raises the
actual honest-to-goodness AssertionError, but that would be an
enhancement, not a bug-fix.
(To be honest, that's what I assumed it would do, until I tried it.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34880>
_______________________________________
More information about the Python-bugs-list
mailing list