[sage-devel] Re: Listing infinite sets using never-ending iterators

2011-01-12 Thread Rob Beezer
There is now a patch for this at: http://trac.sagemath.org/sage_trac/ticket/10470 On Dec 22 2010, 2:09 pm, Nicolas M. Thiery nicolas.thi...@u- psud.fr wrote:         Hi Rob! On Tue, Dec 14, 2010 at 03:09:55PM -0800, Rob Beezer wrote: Symptom:  The following code would appear to run

[sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-15 Thread leif
On 15 Dez., 01:55, Robert Bradshaw rober...@math.washington.edu wrote: I would strongly object to removing the ability to iterate over infinite sets, sometimes it's very useful to iterate until something is found, or to grab a certain number of elements. I would be OK with ZZ.list() throwing

[sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-15 Thread Rob Beezer
On Dec 15, 3:17 am, leif not.rea...@online.de wrote: +1 There's a slight difference between infinite and [non-]enumerable sets you know...  ;-) Right. ;-) What I would like to prevent is a hang when naively asking for the *entire* list of elements of an infinite set, without having to know

[sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-15 Thread leif
On 15 Dez., 17:30, Rob Beezer goo...@beezer.cotse.net wrote: I'd think that If someone wants a handful of elements from a set they know is infinite, then they should construct the iterator (which the list-building routine is using anyway) and just get their elements from that?  A count keyword

[sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-15 Thread Rob Beezer
On Dec 15, 12:18 pm, leif not.rea...@online.de wrote: I thought .list(count=12) or whatever would be more convenient. Yes, that might be a nice enhancement for *somebody* to add, but it won't solve *my* problem (he says, while scratching an itch). ;-) Without looking at the code, I suppose

[sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-14 Thread Simon King
On 15 Dez., 01:55, Robert Bradshaw rober...@math.washington.edu wrote: I would strongly object to removing the ability to iterate over infinite sets, sometimes it's very useful to iterate until something is found, or to grab a certain number of elements. +1 -- To post to this group, send an

Re: [sage-devel] Re: Listing infinite sets using never-ending iterators

2010-12-14 Thread David Roe
+1 On Wed, Dec 15, 2010 at 00:55, Simon King simon.k...@uni-jena.de wrote: On 15 Dez., 01:55, Robert Bradshaw rober...@math.washington.edu wrote: I would strongly object to removing the ability to iterate over infinite sets, sometimes it's very useful to iterate until something is found, or