-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Description
In order to perform branch analysis, it is necessary to know which calls will never return normally. Examples are sys.exit (which always returns via exception) and os.exit (which never returns).
NoReturn should drop out of Union and dominate Intersection.
To manually mark a branch as dead, use cast(NoReturn, expression) in an expression context, or raise in statement context.
This can also be used as the return type of __init__ or __new__ or the metaclass's __call__ to indicate types that can't be normally instantiated.
Metadata
Metadata
Assignees
Labels
No labels