streams (was: Re: Itertools)
Mike Rovner
mike at nospam.com
Wed Jul 30 16:07:11 EDT 2003
Beni Cherniavsky wrote:
> Any feedback welcome. I'd like to make it as Pythonic as possible.
> An perhaps make it standard. Particular open questions:
> - The linked lists are called "streams" by me because they are lazy
> and that's what such beasts are called in functional languages.
Stream is used differently in Tcl and Unix.
Minded separation Python from functional approach (deprecation of filter,
map;
doubtfulness of implementing tail recursion optimization) probably it is not
so
inspiring for regular python programmer.
Lazy "streams" are a good thing provided they can be easily used for
organizing data pathes and connections.
> - `Cons` still requires lisp background but I don't know any name
> that would be recognizable to non-lispers anyway. And it's not
> a bad name.
Construct, Glue, Merge?
Taken readability any whole word is better.
> - I called the operation for creating new iterator from same place
> "forking". Alternative names: `split`, `copy`, `clone`, `dup`,
> "lookahead", etc. What's best?
copy is already using construct in python. Why not use it?
> - Anything else anybody needs?
If I got the intend of Stream correctly, I wish use them as Tcl streams,
so I'd need combining and filtering and i/o.
Just 0.02
Mike
More information about the Python-list
mailing list