itertools: followup to Alex Martelli problem ("number-in-base" ``oneliner'') and Bengt Richter solution
anton muhin
antonmuhin at rambler.ru
Mon Nov 1 08:02:14 EST 2004
More information about the Python-list mailing list
Mon Nov 1 08:02:14 EST 2004
- Previous message (by thread): itertools: followup to Alex Martelli problem ("number-in-base" ``oneliner'') and Bengt Richter solution
- Next message (by thread): Use this important update for Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Oops, it not y-combinator itself, but rather releated thing, sorry. And as followup: iter(callable, sentinel) seems a little bit too restricted for me. The reason is simple: no params are passed to callable and, therefore, it is usually should return the same value. Of course, there are a lot of callable things in Python that don't behave this way, but shouldn't iter have interface like iter(callable, params) that would generated iterator [x, f(x), f(f(x)), ...] that can be stoped with itertools.takewhile if needed? with the best regards, anton.
- Previous message (by thread): itertools: followup to Alex Martelli problem ("number-in-base" ``oneliner'') and Bengt Richter solution
- Next message (by thread): Use this important update for Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list