On 3/18/07, Far McKon <[EMAIL PROTECTED]> wrote: > I'm trying to understand RC's address.py macro so I can add database > support to my crappy crap of crap tags crap. > > 1. There is an __init__ function. I get in general what that does, > but when in the sequence of a page getting fetched does that get > called?
__init__ is a constructor function for an object. The macro itself is being called at the execute() function in the .py file for the macro. Objects being constructed, like the location object, have constructors that get called. > > 2. I see that I can get cursor via self.macro.request.cursor. And via > cursor I can call database functions, and get data out. However the > 'execute' function doesn't pass 'self', and I'm having a hard time > tracing back to where, during the macro execution (when > 'execute(macro,args,formatter)' is called) that it gets to > referencing to self, if self isn't passed over to the execute call in > the first place. self is implicitly passed as the function is defined in the scope of the object. class myobj(object): def myfunction(self, argument): pass m = myobj() m.myfunction(arg) > > A little help would be appreciated. Thanks for putting up with my > n00b question crap folks. > > - Far > _______________________________________________ > Sycamore-Dev mailing list > [EMAIL PROTECTED] > http://www.projectsycamore.org/ > https://tools.cernio.com/mailman/listinfo/sycamore-dev > _______________________________________________ Sycamore-Dev mailing list [EMAIL PROTECTED] http://www.projectsycamore.org/ https://tools.cernio.com/mailman/listinfo/sycamore-dev