Skip to content

Why does checkcast return an Optional? #34

@rd-andreas-tollkoetter

Description

@rd-andreas-tollkoetter

checkcast can never return None, as it would throw in that case. Wouldn't it make more sense to have it return just T instead of Optional[T]? That would make its usage much easier, as I do have to do a assert is not None right now after.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to existing feature

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions