[New-bugs-announce] [issue34880] About the "assert" bytecode
vtheno athena
report at bugs.python.org
Wed Oct 3 02:58:30 EDT 2018
New submission from vtheno athena <a2550591 at gmail.com>:
When I was involved in the YaPyPy project, I found a problem, An source "assert 0" will compile to an bytecode, On that bytecode sequence, it always raise a "AssertionError" from global, when we rewrite global "AssertionError" like here:
```
class AssertionError(Exception):
def __init__(self,msg):
self.msg = f"User AssertionError: {msg}"
# other code
```
so, "assert" is meta-programming?
----------
messages: 326942
nosy: vtheno athena
priority: normal
severity: normal
status: open
title: About the "assert" bytecode
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34880>
_______________________________________
More information about the New-bugs-announce
mailing list