Closed
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?