[ x for x in xrange(10) when p(x) ]
Colin J. Williams
cjw at sympatico.ca
Thu Nov 10 13:18:30 EST 2005
Alex Martelli wrote:
> George Sakkis <gsakkis at rutgers.edu> wrote:
> ...
>
>>>>FP functions like dropwhile/takewhile etc.
>>>
>>>No way -- the itertools module is and remains a PRECIOUS resource.
>>>If you want an iterator rather than a list, itertools.ifilter is quite
>>>appropriate here.
>>
>>What about the future of itertools in python 3K ? IIRC, several
>>functions and methods that currently return lists are going to return
>>iterators. Could this imply that itertools.(imap/ifilter/izip) will
>>take the place of map/filter/zip as builtins ?
>
>
> I think the builtin namespace shouldn't get too crowded. But what I
> think matters little -- what __GvR__ thinks is more important...!-)
>
>
> Alex
Are there generally accepted guidelines on what is appropriate for the
builtin namespace?
Colin W.
More information about the Python-list
mailing list