Chris,
Q&D example of <>.__dict__.items() not working for me:
>>> import threading
>>> class A(threading.Thread):
... def __init__(self):
... threading.Thread.__init__(self)
... def one(self):
... pass
... def two(self):
... pass
...
>>> a = A()
>>>
On Mon, Feb 07, 2005 at 11:57:02AM -0800, Keith Veleba wrote:
> Background:
> I'm working on a project where I have to do some serious
> multithreading. I've worked up a decorator in Python 2.3.4 to implement
> the lock semantics required for specific functions I want to
> synchronize:
I found Chr
> My Question:
>
> If I decorate these function references in __class__.__dict__, am I
> doing it only for my specific instance of that class or the base class
> as well?
A class is a class - so yes, all instances are affected. You might want to
think about metaclasses for decorating.
--
Regards
Hello to all fellow c.l.p'ers!
Long-time listener, first-time caller.
Background:
I'm working on a project where I have to do some serious
multithreading. I've worked up a decorator in Python 2.3.4 to implement
the lock semantics required for specific functions I want to
synchronize:
def synchro