Nerodia Reference Manual

8.8. PyObject🔗

🔗def

Any Python object. That is, an instance of object.

🔗def

Python object. The top (⊤) element of the set of typings.

🔗opaque

Returns the type of the object self.

This is equivalent to type(self) in Python.

🔗opaque

Computes a string representation of the object self.

This is equivalent to the Python expression repr(self).

8.8.1. Conversions🔗

🔗opaque

Computes a string representation of the object self.

This is equivalent to the Python expression str(self).

🔗opaque

Computes a bytes representation of the object self.

This is similar to the Python expression bytes(self), except, for integers, it raises a PyTypeError instead of returning a zero-initialized bytes objects.

🔗opaque

Returns self converted to a float object.

This is equivalent to the Python expression float(self).

🔗opaque

Returns self converted to an integer object.

This is equivalent to the Python expression int(self).

🔗opaque

Returns self interpreted as exactly an int (not one of its subclasses).

This is equivalent to the Python expression operator.index(self).

8.8.2. Attributes🔗

🔗opaque

Returns the attribute name on self.

This is equivalent to the Python expression getattr(self, name).

🔗opaque

Returns the attribute name on self.

This is equivalent to the Python expression getattr(self, name).

🔗opaque

Sets the attribute name on self to val.

This is equivalent to the Python expression setattr(self, name, val).

🔗opaque
Nerodia.PyObject.setAttrByString (self : PyObject) (name : String) (val : PyObject) : CPyUnitIO
Nerodia.PyObject.setAttrByString (self : PyObject) (name : String) (val : PyObject) : CPyUnitIO

Sets the attribute name on self to val.

This is equivalent to the Python expression setattr(self, name, val).

8.8.3. Function Calls🔗

🔗opaque

Calls self with no arguments.

This is equivalent to the Python expression self().

🔗opaque

Calls self with a single argument, arg.

This is equivalent to the Python expression self(arg).