This script is a good demonstration of inheriting python default object types.
It defines a maximum size (items, not bytes) to limit to and use as a normal dis.
It defines a maximum size (items, not bytes) to limit to and use as a normal dictionary (be careful to have KeyError exception handling, or use the dictionary’s get method with a default value).
This can be used for caching of data where the amount of data cached really matters. Hosting servers, for instance, can impose ram usage limitations, and where you’d really like to store all the information in memory.
Download from: Homepage
Author:
Time:
Thursday, May 15th, 2008 at 8:44 pm
Category:
Comments:
You can leave a response, or trackback from your own site.
RSS:
You can follow any responses to this entry through the RSS 2.0 feed.
Navigation: