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: 1.0.0
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).

repr

def repr[T: Writable](value: T) -> String

Returns the string representation of the given value.

Parameters:

  • T (Writable): The type of value. Must implement the Writable trait.

Args:

  • value (T): The value to get the string representation of.

Returns:

String: The string representation of the given value.

def repr(value: None) -> String

Returns the string representation of None.

Args:

  • value (None): A None value.

Returns:

String: The string representation of None.