subtype

A normalized generic type which checks subscripts.

Usage

Source

subtype()

Transforms a generic alias into a concrete type which supports issubclass and isinstance. If the type ends up being equivalent to a builtin, the builtin is returned.

Methods

Name Description
origins() Return origin types which would require instance checks.

origins()

Return origin types which would require instance checks.

Usage

Source

origins()

Provisional custom usage: `subtype.origins.register(, lambda cls: …)