[Python-Dev] collections module (correction) (original) (raw)
Christos Georgiou tzot at sil-tec.gr
Sat Jan 10 11:55:09 EST 2004
- Previous message: [Python-Dev] collections module
- Next message: [Python-Dev] collections module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
And a correction to the size method I suggested for the queue object:
def size(self):
return sum(map(len, self.superlist))
The previous one was giving wrong results when get was called N times and N % maximum_sublist_size != 0.
I believe this should be implemented in C, otherwise the overhead would be too much for queues that never grew.
- Previous message: [Python-Dev] collections module
- Next message: [Python-Dev] collections module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]