Changeset 784:26ec6614a1af
- Timestamp:
- 2009-04-30 20:55:02 (16 months ago)
- Author:
- Stefan Schwarzer <sschwarzer@…>
- Branch:
- default
- convert_revision:
- svn:778c30c8-61e0-0310-89d4-fe2f97a467b2/trunk@835
- Message:
-
Try to minimize further.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r783
|
r784
|
|
| 39 | 39 | """ |
| 40 | 40 | |
| 41 | | from __future__ import generators |
| 42 | 41 | import time |
| 43 | 42 | from ftputil_heapq import heappush, heappop, heapify |
| … |
… |
|
| 202 | 201 | if __name__ == "__main__": |
| 203 | 202 | cache = LRUCache(25) |
| 204 | | print cache |
| 205 | | for i in range(50): |
| | 203 | for i in range(30): |
| 206 | 204 | cache[i] = str(i) |
| 207 | | print cache |
| 208 | | if 46 in cache: |
| 209 | | del cache[46] |
| 210 | | print cache |
| | 205 | if 26 in cache: |
| | 206 | del cache[26] |
| 211 | 207 | # traceback occurs in this assignment |
| 212 | 208 | cache.size = 10 |
| 213 | | print cache |
| 214 | | cache[46] = '46' |
| 215 | | print cache |
| 216 | | print len(cache) |
| 217 | | for c in cache: |
| 218 | | print c |
| 219 | | print cache |
| 220 | | print cache.mtime(46) |
| 221 | | for c in cache: |
| 222 | | print c |