Why aren't you just using python lists? David On Sat, Jun 25, 2011 at 01:44, Rob Beezer <goo...@beezer.cotse.net> wrote:
> I'm having trouble with the construction of a list of vector spaces > with the Sequence() command. > > Is this a bug, or misuse/abuse? Failure, followed by a bit of a > workaround. > > sage: T=[QQ^2, QQ^2] > sage: Sequence(T) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call > last) > > /sage/notebook/devel/sage-main/<ipython console> in <module>() > > /sage/notebook/local/lib/python2.6/site-packages/sage/structure/ > sequence.pyc in Sequence(x, universe, check, immutable, cr, cr_str, > use_sage_types) > 298 return Sequence_generic(x, universe, check, > immutable, cr, cr_str, use_sage_types) > 299 else: > --> 300 return Sequence_generic(x, universe, check, immutable, > cr, cr_str, use_sage_types) > 301 > 302 class Sequence_generic(sage.structure.sage_object.SageObject, > list): > > /sage/notebook/local/lib/python2.6/site-packages/sage/structure/ > sequence.pyc in __init__(self, x, universe, check, immutable, cr, > cr_str, use_sage_types) > 502 self.__universe = universe > 503 if check: > --> 504 x = [universe(t) for t in x] > 505 list.__init__(self, x) > 506 self._is_immutable = immutable > > TypeError: __init__() takes at least 3 arguments (2 given) > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > sage: Sequence(T, check=False) > [Vector space of dimension 2 over Rational Field, Vector space of > dimension 2 over Rational Field] > > -- > 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 > -- 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