On Oct 13, 1:56 pm, Jaap Spies <[EMAIL PROTECTED]> wrote:
> cwitty wrote:
> > On Oct 13, 10:30 am, Jaap Spies <[EMAIL PROTECTED]> wrote:
> >> In sloane_functions.py sequence can now be indexed by reals!?
> >> a(1.0) returns a value. Formerly an error was raised.
>
> > In SloaneSequence.__call__() (which is shared among all sequences) the
> > first thing it does is "m = ZZ(n)", to coerce its argument to an
> > integer.  As of 2.8.7, coercing reals->integer succeeds if the real is
> > exactly equal to an integer.  a(1.1) will still fail.
>
> > So: this is a feature, not a bug.  (And I will be submitting a patch
> > to sloane_functions.py accordingly.)
>
> Sorry, but I don't know yet I consider that a feature! In the context
> of the OEIS is seems silly to allow index 20.0, but maybe there are
> arguments I do not understand. Deleting my examples seems the best way
> to go.

Well, I could be convinced otherwise.  I think it's a good thing that
ZZ(3.0) == 3, but Sloane sequences could do more input validation than
just calling ZZ().  I don't actually care whether an index of 20.0
works or not.

Carl


--~--~---------~--~----~------------~-------~--~----~
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