Ask Your Question

Revision history [back]

(Let me answer my self instead of deleting the question, for other people to refer to:)

Use

from sage.all import *

def test():
    var('a')
    print -1/Integer(2)

Integer(number) is a sage object, thus don't have the python 2 feature.

(Let me answer my self myself instead of deleting the question, for other people to refer to:)

Use

from sage.all import *

def test():
    var('a')
    print -1/Integer(2)

Integer(number) is a sage object, thus don't have the python 2 feature.