Collin Winter wrote:
> However, having the AST compiler expand
>
> class A:
> def m(self):
> blah()
> super(self).m()
> blah()
>
> to
>
> class A:
> def m(self):
> super = super_factory(A)
> blah()
> super(self).m()
> blah()
>
I'm sold on the super(self) syntax and whacked together a quick & dirty
patch. I made my changes in Objects/super.c, rather than the AST as you
suggest. Determining __this_class__ ('A' in your example) without
touching the AST is obviously going to be problematic, but even *with*
the AST how would you propose we determine the "current" class?
I've attached my patch irrespective. All relevant changes are within
super_init.
Forgive the ignorance, I'm relatively new to this stuff :)
Cheers,
Tom
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com