| goonlord ( @ 2009-02-03 08:14:00 |
Greene's Law for Programming Library Construction
If you have an interesting idea for a library, spend a bit of time figuring out how it would work, what sort of calls you want. Then figure out what the technical name ought to be for the type of library you have constructed (doesn't matter if you make up words to accomplish this).
Google the name and find out that it's already in the standard library.
"Iterator Algebras"
http://docs.python.org/library/itertool s.html
(note that this is not strictly what I was looking for, but the obvious interpretation for what it would mean to have iter1+iter2 is obviously either itertools.chain or itertools.izip. I wanted izip).
If you have an interesting idea for a library, spend a bit of time figuring out how it would work, what sort of calls you want. Then figure out what the technical name ought to be for the type of library you have constructed (doesn't matter if you make up words to accomplish this).
Google the name and find out that it's already in the standard library.
"Iterator Algebras"
http://docs.python.org/library/itertool
(note that this is not strictly what I was looking for, but the obvious interpretation for what it would mean to have iter1+iter2 is obviously either itertools.chain or itertools.izip. I wanted izip).