| 1 | initial version |
This is intentional, and it's part of the SageMath preparser. One way to get around this is to turn it off:
A = {1, 2, 3}
B = {3, 4, 5}
preparser(False) # turn off preparsing when Sage reads the function definition
def test():
print("hello")
C = A ^ B
return C
preparser(True) # safe to turn it back on now
test()
| 2 | No.2 Revision |
This is intentional, and it's part of the SageMath preparser. , which automatically converts "^" to "**". One way to get around this is to turn it off:
A = {1, 2, 3}
B = {3, 4, 5}
preparser(False) # turn off preparsing when Sage reads the function definition
def test():
print("hello")
C = A ^ B
return C
preparser(True) # safe to turn it back on now
test()
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.