Changeset 784:26ec6614a1af

Show
Ignore:
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:
1 modified

Legend:

Unmodified
Added
Removed
  • lrucache.py

    r783 r784  
    3939""" 
    4040 
    41 from __future__ import generators 
    4241import time 
    4342from ftputil_heapq import heappush, heappop, heapify 
     
    202201if __name__ == "__main__": 
    203202    cache = LRUCache(25) 
    204     print cache 
    205     for i in range(50): 
     203    for i in range(30): 
    206204        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] 
    211207    # traceback occurs in this assignment 
    212208    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