[pypy-dev] Re: type problems
Michael Hudson
mwh at python.net
Mon Jul 14 12:42:07 MEST 2003
holger krekel <hpk at trillke.net> writes:
> I think that having easy-to-use "aspect-oriented" traces would be nice.
> Actually i'd like to say:
>
> def __init__(self):
> t = functrace('frame construction')
>
> t.dump('self.co_*') # or so
>
> def eval_code(self):
> t = functrace('frame')
>
> and this means that
>
> 1) functrace gets the name of the function by relying on 'self' beeing in
> the parent's frame locals (you may explicitely specify that of course)
>
> 2) the given strings are the "aspects" which you can use to parametrize
> what is beeing displayed
>
> 3) we rely on DECREF(t) when the scope is left (you don't want to
> do a try-finally block all the time, do you?). or alternatively
> call "t.close()" explicitely
Can't you use Python's setprofile/settrace stuff for this? Would make
PyPy even slower, of course :-)
> such a mechanism - reyling somewhat on introspection - would allow for
> a pretty flexible tracing parametrization depending on what you want
> to debug.
Yeah, should be possible.
>> Customizing pdb also looks like a good idea. Uncaught exceptions should
>> automatically throw us into our debugger.
>
> Didn't Michael already do something like that?
Eh, I started. There's not much useful there, yet.
Cheers,
mwh
--
I've even been known to get Marmite *near* my mouth -- but never
actually in it yet. Vegamite is right out.
UnicodeError: ASCII unpalatable error: vegamite found, ham expected
-- Tim Peters, comp.lang.python
More information about the pypy-dev
mailing list