Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-13 Thread William Stein
On Sun, May 13, 2012 at 1:18 AM, Robert Bradshaw wrote: > On Sat, May 12, 2012 at 6:56 PM, kcrisman wrote: >> >> >> On May 12, 4:26 pm, Harald Schilly wrote: >>> On Thursday, May 10, 2012 5:28:38 PM UTC+2, 3DRaven wrote: >>> >>> > There is a suggestion to developers. The construction of >>> > x

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-12 Thread Robert Bradshaw
On Sat, May 12, 2012 at 6:56 PM, kcrisman wrote: > > > On May 12, 4:26 pm, Harald Schilly wrote: >> On Thursday, May 10, 2012 5:28:38 PM UTC+2, 3DRaven wrote: >> >> > There is a suggestion to developers. The construction of >> > x = var('x') >> > solve(x^2 + 3*x + 2, x) >> > is inconvenient and n

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-12 Thread Michael Orlitzky
On 05/12/2012 08:19 AM, Keshav Kini wrote: > > The latter conversation is an approximation of one that I had about five > times near the beginning of our semester-long Sage class for > undergraduates last fall, and which I'm sure other tutors for the class > must have gone through as well with oth

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread Robert Bradshaw
On Fri, May 11, 2012 at 1:39 PM, Jason Grout wrote: > On 5/11/12 2:31 PM, Robert Bradshaw wrote: > >> When the declaration warning becomes an error, it will be a bit >> better. Certainly an argument for not making all undefined symbols >> into symbolic variables. One can write SR("a*x+b") and it d

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread John H Palmieri
On Friday, May 11, 2012 12:31:55 PM UTC-7, Robert Bradshaw wrote: > > I should not that all single-case letters used to be defined, and I > for one was often bitten by this in strange ways. > Wow. Even "n" and "i"? I'm glad that was changed. -- John -- To post to this group, send an email

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread Robert Bradshaw
I should not that all single-case letters used to be defined, and I for one was often bitten by this in strange ways. On Fri, May 11, 2012 at 11:13 AM, Nils Bruin wrote: > On May 11, 12:37 am, Julien Puydt wrote: > >> NameError: name 'y' is not defined -- perhaps you need to type var('y') >> fir

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread Julien Puydt
Le vendredi 11 mai, Nils Bruin a écrit: > On May 11, 10:29 am, kcrisman wrote: > >> sage: _(y)=y > > I thought underscore only worked to give the previous command, but I > > guess the preparser makes this work right. > > No, as far as I can tell, _ is an ordinary variable for python. It's > just

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread P Purkayastha
On Friday, May 11, 2012 3:37:54 PM UTC+8, Snark wrote: > > Le Fri, 11 May 2012 07:16:35 + (UTC), > Simon King a écrit : > > > Hi, > > > > On 2012-05-11, Keshav Kini wrote: > > > kcrisman writes: > > >> To be clear, are you complaining about defining *only* x or that x > > >> *is*, i

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread John Cremona
On 11 May 2012 09:32, Nils Bruin wrote: > On May 11, 1:14 am, John Cremona wrote: >> I would be >> interested to see how many doctests fail if the automattice >> predefinition iof x is turned off.  How might that be done? > > sage/all_cmdline.py > sage/all_notebook.py > > both contain the line: >

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread John Cremona
Maybe this is only a minor point, but having x predefined means that in many doctests where a number field is needed (and there are a lot), the doctest starts with something like sage: K. = NumberField(x^3-2) which means that when the doctest is run, there is an unnecessary overhead involced sinc

Re: [sage-devel] Re: Symbolic variables and uninitialized variables.

2012-05-11 Thread Julien Puydt
Le Fri, 11 May 2012 07:16:35 + (UTC), Simon King a écrit : > Hi, > > On 2012-05-11, Keshav Kini wrote: > > kcrisman writes: > >> To be clear, are you complaining about defining *only* x or that x > >> *is*, in fact, predefined? In any case, this is a discussion we > >> probably don't need