This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] make FrameWrapper a real wrapper

On Fri, 2009-09-18 at 16:26 -0600, Tom Tromey wrote:
> I'm checking this in on the python branch.
> This changes FrameWrapper so that it never directly calls a method on
> self.frame.  Instead, it relies on __getattr__ to do the right thing.
> This is nice because it means you can subclass FrameWrapper and
> intercept any of these calls.
> I think this should eliminate one reason for monkey-patching the frame
> code in the glib printers:
> Alex, does this actually help?

No, it doesn't. Because the backtracing code will construct FrameWrapper
objects, not my subclasses of it.

What happens is that I will create a wrapper similar to FrameWrapper
that does filtering stuff, and then the backtrace code will chain all
these toghether with FrameWrapper as the innermost wrapper of the actual

So, when something calls describe on my wrapper it will either do stuff,
or pass onto its wrapped object totally. Eventually it will reach
FrameWrapper.describe() which will call to get the name.
This "name" is looked up on the FrameWrapper, not on my filters frame
wrapper object though, so will be unaffected by whatever I do.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]