Re: C replacement for Queue module

2005-10-22 Thread Jason Lai
As far as Queues go, the adding/popping is apparently done with deque which are implemented in C. The Queue class pretty much just provides blocking operations and is otherwise a very thin layer around deque. As far as primitives go, only threading.Lock is written in C and the others are pure Pytho

Re: C replacement for Queue module

2005-10-21 Thread Jason Lai
How about Python 2.4's collections.deque class? Supposedly it's thread-safe, and it's implemented in C. - Jason -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I call a subclass method from parent class ?

2005-10-20 Thread Jason Lai
If you use a newstyle class, e.g. class A(object), then you can get the superclass with cls.__base__. You could also use super(cls,cls), although note that it returns a object that isn't exactly the same thing as a class -- but good enough for just accessing attributes. Make sure to check that yo