Macaulay2 » Documentation
Packages » Python » PythonObject » PythonObject - PythonObject
next | previous | forward | backward | up | index | toc

PythonObject - PythonObject -- subtract Python objects

Description

Subtract two Python objects.

i1 : toPython 2 - toPython 3

o1 = -1

o1 : PythonObject of class int

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object before subtracting.

i2 : toPython 4 - 5

o2 = -1

o2 : PythonObject of class int
i3 : 6 - toPython 7

o3 = -1

o3 : PythonObject of class int

It may also be used as a unary method.

i4 : -toPython 6

o4 = -6

o4 : PythonObject of class int

See also

Menu

Ways to use this method:


The source of this document is in Python/doc/arithmetic.m2:119:0.