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) > > /home/fs/src/workflow/<ipython console> in <module>() > > TypeError: argument of type 'sage.rings.integer.Integer' is not iterable > 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 in Fields` instead of `ZZ in > Fields()`, to minimize confusion...? Or maybe doing so would be > misleading in ways I haven't realized?
It works because Nicolas did the work (Ticket #9469 Category membership, without arguments, Merged in: sage-5.0.beta6). I think you are right saying that we should teach "QQ in Fields" to beginner rather than "QQ in Fields()", except that if I remember correctly, there is a performance issue for the short notation. Also they don't have the exact same meaning. The difference is apparent in sage: QQ^2 in VectorSpaces(QQ) True sage: QQ^2 in VectorSpaces True sage: QQ^2 in VectorSpaces(CC) False Note that they are still some mathematically surprising answers: sage: QQ in VectorSpaces(QQ) # bootstrap problem False sage: QQbar in VectorSpaces(QQ) False So the answer is: thinks are going better in each new Sage release. Cheers, Florent -- 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