[SciPy-user] array like circular buffer?

skip@pobox.com skip at pobox.com
Thu Oct 27 15:27:53 CDT 2005

    John> I would like to have a fixed size array like data structure that
    John> has circular buffer semantics.  Eg, when empty you can call a
    John> "put" method that starts in the beginning and fills the sucker up,
    John> and when you overflow the end it starts pushing the data from the
    John> 0 index off the stack -- FIFO.  Ideally, it would support slicing
    John> and friends.

How about subclassing list and proving relevant methods that adjusted all
indices by modulo the list length?


More information about the SciPy-user mailing list