Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify serialization interface to CesrSuber and its subclasses CatCesrSuber etc. #752

Open
SmithSamuelM opened this issue Apr 12, 2024 · 0 comments

Comments

@SmithSamuelM
Copy link
Collaborator

Currently the interface for serializaton requires passing in primitive instance in order to serialize. However when creating the Instance the .klas variable holds the class. So it would be possible to also allow simply passing in an already serialized value or tuple of values.

Also the ._ser method does not check that the .klas matches the ._ser instance types. This would allow someone to write the wrong serialization.

So might want to add a strict attribute that enforces subclass of ._ser to match .klas
finally with strict then one could force des/ser using .klas when passed in already serialized. The last would avoid having to
pass around the instances everywhere when the only purpose of the instances is to satisfy the interface for CatCesrSuber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant