I added some recipes to the Python Cookbook:
- listmixin
Use ListMixin to create custom list classes from a small subset of
list methods:
- pytime
Improves on timeit by allowing you to time a function directly
(no need for confusing import and exec B.S.), and not requiring
you to specify the number of iterations for the timing loop.
- bitlist
An example of listmixin: A memory compacted list of bits, uses
1 byte per every 8 elements.
I hope you find these useful.
You can find more Python stuff by myself (and other misc thoughts) at
my blog (http://barnesc.blogspot.com/).
- Connelly Barnes
Comment