Macaulay2 » Documentation
Packages » Python » PythonObject » PythonObject @@ Thing = Thing
next | previous | forward | backward | up | index | toc

PythonObject @@ Thing = Thing -- set an attribute of a python object

Description

This is equivalent to the Python setattr function. Note that e is converted to a Python object using toPython.

i1 : math = import "math"

o1 = <module 'math' (built-in)>

o1 : PythonObject of class module
i2 : math@@pi = 22/7 
i3 : math@@pi

o3 = 3.142857142857143

o3 : PythonObject of class float

Ways to use this method:


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