Hey,
   In a few places, I think we already are assuming generators are for 
finite lists. However I also think its better to use IterableFunctionCall 
since if we do something like:
{{{
sage: L = CarteseanProduct(Partitions()) # Maybe for a better example 
Partitions_all.__iter__()
sage: for x in L: print x
}}}
it doesn't break any different/more than
{{{
sage: for x in Partitions(): print x
}}}

Best,
Travis


On Tuesday, November 27, 2012 12:49:13 PM UTC-8, Nicolas M. Thiery wrote:
>
> On Tue, Nov 27, 2012 at 12:33:45PM -0800, Volker Braun wrote: 
> >    My reason for erroring out was to catch buggy code that might have 
> slipped 
> >    through the cracks. 
> >    I don't mind converting generators to lists, but that also means that 
> >    infinite generators will then fail by filling all available memory. 
> But at 
> >    least it won't return a wrong answer ;-) 
>
> Right. It's probably better to use IterableFunctionCall: then it would 
> not fill up the memory at construction time. Of course the fill up 
> will eventually occur when running through the CartesianProduct; but 
> then the caller is just getting what he asked for :-) 
>
> In fact, Vincent's Enumerated set from iterator would probably be 
> better than IterableFunctionCall, but #12518 is still in needs review 
> (volunteers?). 
>
> Cheers, 
>                                 Nicolas 
> -- 
> Nicolas M. Thi�ry "Isil" <nth...@users.sf.net <javascript:>> 
> http://Nicolas.Thiery.name/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/1Ku3o_DaUz0J.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to