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

PythonObject @@? Thing -- whether a python object has an attribute

Description

This is equivalent to the Python hasattr function.

i1 : foo = toPython "Hello, world!"

o1 = Hello, world!

o1 : PythonObject of class str
i2 : foo@@?upper

o2 = true
i3 : foo@@?bar

o3 = false

Ways to use this method:


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