For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
ConvertibleFromPython
Denotes a type that can attempt construction from a read-only Python object.
Implemented traits
AnyType,
Copyable,
Deinitable,
Movable
Required methods
__init__
def __init__(out self, *, py: PythonObject)
Attempt to construct an instance of this object from a read-only Python value.
Args:
- py (
PythonObject): The Python object to convert from.
Returns:
_Self
Raises:
If conversion was not successful.