On 5/11/07, David Roe <[EMAIL PROTECTED]> wrote:
> > 1) I started moving desolvers.py into
> SAGEHOME/devel/sage-main/build/sage/calculus/.  Is this the
> appropriate place?
>
> Seems like a good place to me.
>
> > 2) You use "Integer(i)" instead of just "i", which seems unnecessary. I
> changed all of these, but I am wondering why they were as they were.
>
> The reason to use Integer(i) in general is that, in .py and .pyx files, if
> you use just i, Python will use Python ints, which may or may not be what
> you want (it's somewhat useful as loop variables, but otherwise you'd
> probably rather be using an Integer).

Also it can be very useful for typing checking and flagging errors.
E.g., if a user passes in something that isn't an integer, and you write
Integer(i), they'll get an appropriate error.  If you do int(i), it will take
the floor and silently seem to work, but maybe give nonsense.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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