yr.option

option(
    label: str,
    description: str | None = None,
) → Option

Create an Option instance.

Parameters

label
type: str

The visible label for the option.

description
type: str | None = None

Optional descriptive text.

Returns

type: Option

An Option instance with given label and description.

Examples

Describe possible destinations for a day trip:

python
import yera as yr

museum = yr.option(
    "Museum",
    "Spend the afternoon viewing art.",
)
park = yr.option(
    "Park",
    "Walk outdoors if the weather is fine.",
)