[TransWarp] Re: E&S CVS Commit: pylib
[Simplification-Branch]
Phillip J. Eby
pje at telecommunity.com
Mon Feb 11 11:19:48 EST 2002
At 01:52 PM 2/10/02 +0000, Steve Alexander wrote:
>pje at eby-sarna.com wrote:
>>Added 'TW.Utils.Code', a module which supports bytecode inspection and
>>hacking. Revised 'Eval()' to use the new module to do its code inspection,
>>and added some simple bytecode hacking that makes any errors in the
>>expression show up at the line and module where 'Eval()' was originally
>>called, rather than in "<string> at line 0".
>
>Hi Phillip,
>
>Does this mean that runtime error messages are given with respect to
>untangled (pre-woven) aspects?
That was already true, *except* for when you used 'Eval("expression")'. If
there was an error in the expression, the traceback would show "line 0 of
<string>" and not show the source of the expression that broke. Now, it
should show the line of code where 'Eval()' was called from - although the
error is not actually occurring in that line. The traceback should make
everything clear, however.
>If so, this solves one of my fears about aspect oriented development.
Even before this, the Python tracebacks would have told the story, for
anything other than 'Eval()'. TW leaves the original function objects
pretty much alone when combining classes, so they still know their original
file and line numbers. Even with the new "module inheritance" feature
which copies functions and rebinds their globals, the functions' code
objects still point back to the source file and line where they were defined.
By the way, thanks for the inquiry; I was beginning to worry that the TW
mailing list was completely dead, which would be a shame considering all
the work I've been putting into building a new documentation and news
website for TW. :) Some very cool things are coming up, as I further
reduce the amount of mental overhead needed to start using TransWarp.
More information about the PEAK
mailing list