| 1 | initial version |
varx = var('x y') defines a tuple of two variables, which can be accessed as varx[0] and varx[1], which have names x and y respectively.
list(varl) is undefined as its requests conversion of a variable varl into a list. It's not the same as creating a list composed of a single variable, which would be [varl] as you noticed. And in general, list(obj) is not the same as [obj] where obj is any object.
| 2 | No.2 Revision |
varx = var('x y') defines a tuple of two variables, which can be accessed as varx[0] and varx[1], which have names x and y respectively.
list(varl) is undefined as its requests conversion of a variable varl into a list. It's not the same as creating a list composed of a single variable, which would be [varl] as you noticed. And in general, list(obj) is not the same as [obj] where obj is any object.
list(varx) converts the tuple varx into a list (still composed of two variables), which enables further concatenations with other lists, like list(varx)+[varl].
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.