In lista infinita?

Andrea Crotti kerny404 at gmail.com
Wed Dec 9 08:48:46 EST 2009


On 8 Dic, 18:50, Andreas Waldenburger <use... at geekmail.INVALID> wrote:
> Maybe. But I'm sure it.comp.lang.python might help you better. And from
> the looks of it, you seem to have started a similar thread there
> (called "Generatori infiniti").
>
> Generally, you'll fare better with English (even broken English will be
> fine.) in this group. It's just nicer for everyone if they can
> understand all messages and not feel left out.
>
> Anyway, good luck with your question. I didn't understand a whole lot
> of it, but I guess you want to test for membership in an infinite
> list/generator. Yes, possible in principle, but obviously eats memory
> for larger generators. Also, consumes the generators, which is also a
> factor.
>

I'm sorry of course it was a mistake, I wanted to post on it.comp. but
I had this other group open...

Anyway it was not really a question, that code was just something to
check if an element is a member of a generator.
Is always possible to write
a in x()
but if it's not in it doesn't terminate, passing the right function
(in that case it was just increasing sequence) will do the trick..



More information about the Python-list mailing list