On 12/8/06, William Stein <[EMAIL PROTECTED]> wrote:
> I think that's an excellent idea.  Either the functions could be iterators
> or just return the n-th element, or return a list, depending on the nature
> of the sequence.  Anything but printing would be OK with me.

As I mentioned on the list a while back (in September), I use a
'Sequence' class for integer sequences (and polynomial sequences, etc)
in my own code. This way I can implement either an .nth(n) or
.generate() method (or both) for a specific sequence, and the class
implementation takes care of the details, providing a uniform and
extensible list-like interface for all sequences. (I also have OEIS
search support and automated OEIS lookup of initial terms for
unimplemented sequences :-) If you plan to add a large database of
integer sequences to sage, something like this might be a good idea.
I'd like to help out with this, but I won't have time in the near
future. Fortunately, it's not much work to implement from scratch if
anyone else thinks it's a good idea.

Fredrik Johansson

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to