typing.cast()

typing.cast(typ, val)

Cast a value to a type.

This returns the value unchanged. To the type checker this signals that the return value has the designated type, but at runtime we intentionally don’t check anything (we want this to be as fast as possible).

doc_python
2016-10-07 17:45:55
Comments
Leave a Comment

Please login to continue.