Message73354
What would you suggest? The docs already say:
Though list objects support similar operations, they are optimized
for fast fixed-length operations and incur O(n) memory movement costs
for pop(0) and insert(0, v) operations which change both the size and
position of the underlying data representation.
How would you suck elements out of a list? Probably with something
like:
while mylist:
elt = mylist.pop()
Aside from possible performance issues it's not clear that you would use
a deque object differently than a list in this context. |
|
Date |
User |
Action |
Args |
2008-09-18 02:27:36 | skip.montanaro | set | recipients:
+ skip.montanaro, rhettinger, roysmith |
2008-09-18 02:27:36 | skip.montanaro | set | messageid: <1221704856.59.0.87124150773.issue3891@psf.upfronthosting.co.za> |
2008-09-18 02:26:36 | skip.montanaro | link | issue3891 messages |
2008-09-18 02:26:35 | skip.montanaro | create | |
|