Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import typing
- import data_types # New module!
- R = typing.TypeVar('R')
- E = typing.TypeVar('E')
- class Result(data_types.Data, typing.Generic[R, E]):
- class Constructors(data_types.Constructors):
- # Constraints are required at runtime, but may not be enforced
- Ok = R,
- Err = E,
- ---
- import typing
- import data_types # New module!
- R = typing.TypeVar('R')
- E = typing.TypeVar('E')
- class Result(data_types.Data, typing.Generic[R, E]):
- class Constructors(data_types.Constructors):
- # Constraints may not exist, but mypy should fail if they don't
- Ok: R,
- Err: E,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement