Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can change that easily, with izip from itertools.

The fact that a bunch of builtins and the values/items methods of dictionaries have become iterators is not very siginificant IMHO. Python 2 code could already be written to use iterators or generator expressions, so in the parts where it was crucial it was already done. In this regard Python 3 has not added new functionality but only changed defaults.

The unicode change is the big one.



In this case (checking that process(input) == output), itertools.izip_longest is probably that right solution, unless there's an out-of-band way to know that inputs.txt is the same length as outputs.txt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: