You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should rethink the way we're structuring our classes in dtype.py. Currently we have everything inheriting from Primitive type and it's turned into a bit of a messy catchall for all sorts of stuff. The inheritance of Complex types from it ends up being, at best, meaningless since the vast majority overwrite the encode / decode methods. Things like Time40 ends up shoehorned in by setting a 4-byte primitive type and then manually overwriting the byte/bit counts to support the 5-byte type.
TLDR: PrimitiveType isn't great.
I think we'd be better served by throwing an abstract base class in there to mandate the API that we require. It would likely make the user-facing portion of it more coherent as well.
The text was updated successfully, but these errors were encountered:
We should rethink the way we're structuring our classes in
dtype.py
. Currently we have everything inheriting from Primitive type and it's turned into a bit of a messy catchall for all sorts of stuff. The inheritance of Complex types from it ends up being, at best, meaningless since the vast majority overwrite the encode / decode methods. Things like Time40 ends up shoehorned in by setting a 4-byte primitive type and then manually overwriting the byte/bit counts to support the 5-byte type.TLDR: PrimitiveType isn't great.
I think we'd be better served by throwing an abstract base class in there to mandate the API that we require. It would likely make the user-facing portion of it more coherent as well.
The text was updated successfully, but these errors were encountered: