[Zope-dev] Acquisition and Threads

Magnus Heino magnus.heino@pleon.sigma.se
Fri, 7 Dec 2001 13:06:38 +0100


Can someone please tell me what is going on here?




[magnus@bombardier magnus]$ cat aq.py

from Acquisition import Implicit
from threading import Thread
import time

class A(Implicit, Thread):

        def run(self):
                print context.aq_self


class B(Implicit):
        pass

b = B()
b.a = A()
b.a.start()
time.sleep(2)

[magnus@bombardier magnus]$ python2 aq.py
Traceback (most recent call last):
  File "aq.py", line 16, in ?
    b.a = A()
  File "/usr/lib/python2.1/threading.py", line 326, in __init__
    _Verbose.__init__(self, verbose)
TypeError: unbound method __init__() must be called with instance as first
argument