-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
static typingtype annotations, use of type checkers directly from the spectype annotations, use of type checkers directly from the spec
Description
Also splitting this off from #187 (comment)
We have various dtypes: Int64
, Int32
, ...., Bool
, which are part of the API.
We have functions which accept any dtype, such as
def column_from_sequence(sequence: Sequence[Scalar], *, dtype) -> Column:
How do we type dtype
? I originally wanted to have DType
be a common superclass of the dtypes, so we could have
def column_from_sequence(sequence: Sequence[Scalar], *, dtype: DType) -> Column:
but it's been brought up that this isn't desirable because it would add a class to the namespace for the sole purpose of type checking.
Are there alternatives which would be acceptable?
Metadata
Metadata
Assignees
Labels
static typingtype annotations, use of type checkers directly from the spectype annotations, use of type checkers directly from the spec