First time here? Check out the FAQ!

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.

click to hide/show revision 2
No.2 Revision

(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.