Skip to content

(📚) What do all the symbols mean in the output of reveal_type #11519

Open
@KotlinIsland

Description

@KotlinIsland

Documentation

reveal_type("shaking")  # Literal["shaking"]?

reveal_type(int("1"))  # builtins.int*

from typing import TypeVar
T = TypeVar("T")
def foo(t: T) -> T:
    reveal_type(t)  # T`-1

What do all these wacky symbols mean *, ? and

`-1

I'm guessing there might be others as well.

I looked through the docs and couldn't find anything about it.

Also <: and :>, maybe also def(int) -> str and def().

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions