Farshid,

This is a great help, thanks.

The second point won't work, though, because by parent class I mean,
simply, the object that created the current object, *not* the class the
current class is based on.

So, for example:

class A(object):
    def __init__(self):
        self.thing = Thing()
        self.thing.meth()

    def do_stuff(self):
        print "Stuff"

class Thing(object):
    def meth(self):
        #now here's what I WANT
        self.parent.do_stuff(args)

Is there a built in way to do this in Python, or do I have to pass
"parent" when I init Thing?

Sorry if this is confusing. It confuses me, too. I should have been a
carpenter.

- Dave

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to