Lisp mentality vs. Python mentality

namekuseijin namekuseijin.nospam at
Sun Apr 26 20:07:42 CEST 2009

Paul Rubin wrote:
> namekuseijin <namekuseijin.nospam at> writes:
>>       return (len(a) == len(b)) and not any(not comp(*t) for t in
>> (zip(a, b)))
>> plus the zip call enclosed in parentheses got turned into an iterator.
> zip in python 2.x always makes a list.  You want itertools.izip.
> You could also use itertools.starmap.

hmm, somehow I thought putting any sequence into parenthesis would 
always yield a generator...

More information about the Python-list mailing list