[sage-devel] Re: Deleting depreciated is_functions

2012-03-27 Thread Keshav Kini
To respond to the OP: I'm all for getting rid of these functions. "Nicolas M. Thiery" writes: > Also, the idiom ``is_Field(P)`` would be best replaced by ``P in Fields()``. As a beginner I might wonder, "Why is it `5/1 in ZZ` but `ZZ in Fields()`? Why not `5/1 in ZZ()` or `ZZ in Fields`?" These

[sage-devel] Re: Deleting depreciated is_functions

2012-03-28 Thread Keshav Kini
Florent Hivert writes: >> sage: ZZ in Fields >> False >> sage: ZZ in Fields() >> False >> sage: QQ in Fields >> True >> sage: QQ in Fields() >> True >> >> I don't pretend to understand why this is the case :) But maybe it's >> better if we tell new users to use `ZZ

[sage-devel] Re: Deleting depreciated is_functions

2012-03-28 Thread David Kohel
Hi, 1. (On Sage syntax): For the record, there are some reasons why ZZ in Fields doesn't (and perhaps shouldn't) make sense: Fields is a function not the category it returns: sage: Fields sage: Fields() Category of fields I think a student learning Sage should have a first session in which the

[sage-devel] Re: Deleting depreciated is_functions

2012-03-29 Thread Simon King
Hi Florent! On 2012-03-28, Florent Hivert wrote: >> For parameter-less categories like Fields, I don't have a feeling for >> whether one should teach new users to use the idiom ``X in Fields`` or >> ``X in Fields()``. I tend to use the later mysefl. > > Speed could be a (not so important) argumen

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-03-28 Thread Florent Hivert
Hi Keshav, > Incidentally, `ZZ in Fields` works just fine:: > > sage: 5/1 in ZZ > True > sage: 5/1 in ZZ() > > --- > TypeError Traceback (most recent call > last) >

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-03-28 Thread Nicolas M. Thiery
On Wed, Mar 28, 2012 at 05:39:51AM -0700, David Kohel wrote: > Doing some magic to make 'QQ^2 in VectorSpaces' work > might just do injustice to first-time users, since it defers > the realization that they just made a typo -- unless > VectorSpaces is no longer a Python class: > > sage: VectorSpac

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-03-28 Thread Florent Hivert
On Wed, Mar 28, 2012 at 11:27:24PM +0200, Nicolas M. Thiery wrote: > On Wed, Mar 28, 2012 at 05:39:51AM -0700, David Kohel wrote: > > Doing some magic to make 'QQ^2 in VectorSpaces' work > > might just do injustice to first-time users, since it defers > > the realization that they just made a typo

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-03-29 Thread David Roe
I think the idea was that if you cared about speed you would just use Fields(), but that it wasn't an important point in discussing whether QQ in Fields should be valid. David On Thu, Mar 29, 2012 at 09:06, Simon King wrote: > Hi Florent! > > On 2012-03-28, Florent Hivert wrote: > >> For parame

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-03-29 Thread Florent Hivert
Hi Simon, > On 2012-03-28, Florent Hivert wrote: > >> For parameter-less categories like Fields, I don't have a feeling for > >> whether one should teach new users to use the idiom ``X in Fields`` or > >> ``X in Fields()``. I tend to use the later mysefl. > > > > Speed could be a (not so im

Re: [sage-devel] Re: Deleting depreciated is_functions

2012-04-10 Thread Starx
Well, I wrote a script to delete some of the is_* functions, but it turned out to be a little more complicated of a task then I thought it would be, so this patch doesn't delete as many as I was aiming for but at least it's a start: http://trac.sagemath.org/sage_trac/ticket/12824 -Jim On Thu, Mar