| 1 | initial version |
Attention, pitfall:
a = b = vector(QQ,2)
is NOT a shortform of
a = vector(QQ,2)
b = vector(QQ,2)
The first creates exactly one vector object, a an b refer to the same object. The second creates two independent objects, a and b refer to different objects.
print a == b, a is b
shows the difference.
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.