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

PythonObject ~ -- bitwise negation of a python object

Description

This operation negates each bit. For integers, this is equivalent to CODE "-x - 1". Unlike Python, ~ is a postfix unary operator in Macaulay2.

i1 : (toPython 5)~

o1 = -6

o1 : PythonObject of class int

See also

Ways to use this method:


The source of this document is in Python/doc/bitwise.m2:524:0.