Message5113
The relevant problem is in org.python.compiler.CodeCompiler#visitAssert:
code.getstatic("org/python/core/Py", "AssertionError",
"Lorg/python/core/PyObject;");
We can't use this optimization to the standard builtin AssertionError,
instead it should be using getattr. Notably in CPython, this is possible
to do:
>>> import __builtin__
>>> del __builtin__.AssertionError
>>> assert 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: global name 'AssertionError' is not defined |
|
Date |
User |
Action |
Args |
2009-09-07 17:58:47 | zyasoft | set | messageid: <1252346327.07.0.196145735873.issue1461@psf.upfronthosting.co.za> |
2009-09-07 17:58:47 | zyasoft | set | recipients:
+ zyasoft, fwierzbicki, hpk |
2009-09-07 17:58:47 | zyasoft | link | issue1461 messages |
2009-09-07 17:58:46 | zyasoft | create | |
|