[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-16 Thread Simon King
Hi all! On 15 Dez., 15:39, Simon King simon.k...@uni-jena.de wrote: This is why I suggest the scenario the ring constructor prints a warning if the variable name is not a string: QQ[x] or PolynomialRing(QQ,[singular],1) would result in a warning, but the *intended* use QQ['x'] or

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-16 Thread luisfe
On Dec 16, 6:32 pm, Simon King simon.k...@uni-jena.de wrote: Hi all! On 15 Dez., 15:39, Simon King simon.k...@uni-jena.de wrote: This is why I suggest the scenario the ring constructor prints a warning if the variable name is not a string: QQ[x] or PolynomialRing(QQ,[singular],1) would

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-16 Thread Simon King
Hi Luis, On 16 Dez., 20:12, luisfe lftab...@yahoo.es wrote: What does it mean 'deprecation'? Will this mean that at some point sage: var('x') sage: QQ[x] will be invalid code? I think it should be invalid code. Or, at least PolynomialRing(QQ,[singular]) should be invalid. Currently, it

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-15 Thread Volker Braun
The second option sounds better to me. In any case, it would be very helpful if the error message would explain how to do it correctly, for example: WARNING: The given argument 'z' is a symbolic expression; this is not the same as a generator of Univariate Polynomial Ring in z over Rational

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-15 Thread luisfe
On Dec 15, 8:35 am, Simon King simon.k...@uni-jena.de wrote: Hi! My impression is that relatively often questions on sage-support are about people accidentally mixing symbolics and polynomials. For example sage: z = var('z') sage: R = QQ[z] and then believing that z is the

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-15 Thread Simon King
Hi Volker, On 15 Dez., 14:39, Volker Braun vbraun.n...@gmail.com wrote: The second option sounds better to me. In any case, it would be very helpful if the error message would explain how to do it correctly, for example: WARNING: The given argument 'z' is a symbolic expression; this is not

[sage-devel] Re: Preventing misuse of symbolic variables?

2010-12-15 Thread Simon King
Hi Luis! On 15 Dez., 14:55, luisfe lftab...@yahoo.es wrote: It would not be more convenient for these cases a FAQ about sage? Perhaps in addition. How many people read the FAQ *before* programming? var(z) produces a variable, and the generators of a polynomial ring are also frequently called