Re: Learning to use decorators with classes

2009-07-01 Thread Bruno Desthuilliers
sk8in_zo...@yahoo.com.au a écrit : --- On Tue, 30/6/09, Bruno Desthuilliers wrote: (snip) This can't work, and it's a FAQ FWIW - but since there's no official c.l.py FAQ, we won't hold it against you !-) Can you please point me to the FAQ related to this snippet. I would be grateful. W

Re: Learning to use decorators with classes

2009-06-30 Thread sk8in_zombi
--- On Tue, 30/6/09, Bruno Desthuilliers wrote: > > Don't use '__name__', they are reserved for the > implementation. And FWIW, don't use '__name' unless you have > a really compelling reason to do so. > That was an honest mistake!. Noted :) > > >     def search(self, **kw): > >         pri

Re: Learning to use decorators with classes

2009-06-30 Thread Bruno Desthuilliers
Mr SZ a écrit : Hi, I'm writing an LDAP plugin for my TG2 application. In this I wrote a small class based decorator with args to set up a connection and call the necessary functionality but I'm having problems with it. Here's my code: (snip code) class LdapPlugin(Plugin): ... def _

Learning to use decorators with classes

2009-06-30 Thread Mr SZ
Hi, I'm writing an LDAP plugin for my TG2 application. In this I wrote a small class based decorator with args to set up a connection and call the necessary functionality but I'm having problems with it. Here's my code: class getConnection(object): def __init__(self, settings, credentials)