On 9/4/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 06:24 PM 9/3/2005 +1000, Christopher Armstrong wrote: > >For example, perhaps a better idea would be to > >change the traceback-printing functions to use Python attribute lookup > >instead of internal structure lookup, and then change raise to accept > >arbitrary Python objects as its third argument, as long as it matches > >the traceback interface. > > Given that traceback printing isn't a performance-critical activity, there > probably isn't a reason any more for requiring a particular C layout. On > the other hand, being able to create frame or traceback instances or > subclasses would probably also solve your problem, without having to do too > much hacking on the C code that expects a particular layout.
I guess the biggest difference in these two strategies, to me, is that one can be implemented in an external module while the other *requires* changes to CPython to work. So I'll do the former, i.e., writing C functions that construct traceback objects, accessible from Python. Maybe after I do that I could write a PEP (if that's necessary) on changing the traceback stuff on a more fundamental level, to allow for Python objects. putting-on-his-C-gloves-ly, -- Twisted | Christopher Armstrong: International Man of Twistery Radix | -- http://radix.twistedmatrix.com | Release Manager, Twisted Project \\\V/// | -- http://twistedmatrix.com |o O| | w----v----w-+ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com