IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
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:

Returns:

_Self Raises:

If conversion was not successful.