fifo queue

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Sun Mar 18 19:27:44 EDT 2007


drochom schreef:
> hi,
> 
> how would u improve this code?
> 
> class queue:
 > ...

I think I'd use collections.deque [1] instead of using a ring buffer as 
you're doing (I think) and doing a lot of manual bookkeeping.

[1] http://docs.python.org/lib/deque-objects.html



-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-list mailing list