writing Python in Emacs

2008-01-19 Thread Richard Szopa
Hi All, I am a devoted Emacs user and I write a lot in Python. However, I never managed to get my Emacs configuration right for this purpose. There were some discussions on this, but the threads that show if I search the group are either old or not so relevant. I need the following features: 0)

Re: super, decorators and gettattribute

2008-01-15 Thread Richard Szopa
On Jan 15, 8:06 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Unfortunately the links [2], [3] and [4] are not given, Luckily, there's Google :) [2] Article about MRO: http://www.python.org/download/releases/2.3/mro/ [3] Descriptor HowTo: http://users.rcn.com/python/download/Descriptor.htm [4

Re: super, decorators and gettattribute

2008-01-14 Thread Richard Szopa
On Jan 14, 11:05 pm, thebjorn <[EMAIL PROTECTED]> wrote: > I don't remember if CLOS was changed to use C3 Linearization also, but > the concept came from Dylan (http://www.webcom.com/haahr/dylan/ > linearization-oopsla96.html) and that's what is implemented in Python. The Common Lisp ANSI standar

Re: super, decorators and gettattribute

2008-01-14 Thread Richard Szopa
On Jan 14, 1:53 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > I really need to publish this one day or another, since these > questions > about super keeps coming out: > > http://www.phyast.pitt.edu/~micheles/python/super.html Thanks, Michele! Your essay was enlightening [2]. Specially if yo

Re: super, decorators and gettattribute

2008-01-14 Thread Richard Szopa
On Jan 13, 3:31 pm, thebjorn <[EMAIL PROTECTED]> wrote: > They do, except for when it comes to what super(..) returns. It isn't > really an object in the sense that they're presented in the tutorial, > but rather a sort of proxy to the methods in the ancestor classes of > the concrete object (self

Re: super, decorators and gettattribute

2008-01-13 Thread Richard Szopa
On Jan 13, 8:59 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 12 Jan 2008 14:23:52 -0800, Richard Szopa wrote: > > However, I am very surprised to learn that > > > super_object.__getattr__(name)(*args, **kwargs) > > > getattr(super_o

Re: super, decorators and gettattribute

2008-01-12 Thread Richard Szopa
On Jan 12, 9:47 pm, Mike Meyer <[EMAIL PROTECTED]> wrote: > The same way you call any object's methods if you know it's name": > > getattr(super_object, name)(*args, **kwargs) Thanks a lot for your answer! However, I am very surprised to learn that super_object.__getattr__(name)(*args, **kw

Re: super, decorators and gettattribute

2008-01-12 Thread Richard Szopa
On Jan 12, 7:45 pm, Richard Szopa <[EMAIL PROTECTED]> wrote: > doing anything (initially I wanted to do something like CLOS > [1] :before and :end methods, but that turned out to be too > difficult). Erm, I meant :before and :after methods. -- Richard -- http://mail.pyt

super, decorators and gettattribute

2008-01-12 Thread Richard Szopa
Hello all, I am playing around w/ Python's object system and decorators and I decided to write (as an exercise) a decorator that (if applied to a method) would call the superclass' method of the same name before doing anything (initially I wanted to do something like CLOS [1] :before and :end meth