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: VectorSpaces
> <class 'sage.categories.vector_spaces.VectorSpaces'>
> 
> rather an instance of the category of vector spaces.

The rationale for that magic is that ``V in VectorSpaces`` is a short,
readable, and unambiguous idiom for asking whether V is a vector space
(over some field).

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.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to