
May 1, 2009
4:49 p.m.
2009/4/30 Antoine Pitrou <solipsis@pitrou.net>:
spir <denis.spir@...> writes:
now I wonder whether it's really worth it. Because usually it's a very simple thing to implement -- often two obvious lines of code -- and easy to
understand, even for someone who does
not know the principle yet.
Well, for one, a generic implementation may have to be thread-safe. Also, while it's easy to implement, it's the kind of useful primitive - like enumerate() and others - which is nice to have builtin in the language or the standard library.
Except that the implementation of enumerate() is not in debate (nor its interface). For caching it will probably be a different story. -- Arnaud