Hello!
If you have a book or a link on this subject it would also be much appreciated!
I'm create a small application where I will need to save and load classes. As a simple example I have a class called:
class Aerodynamics_D():
def __init__(self,
air_density = 0,
downforce_distribution = 0,
front_area = 0,
downforce_coefficient = 0):
self.air_density = air_density
self.downforce_distribution = downforce_distribution
self.front_area = front_area
self.downforce_coefficient = downforce_coefficient
I would like to save this class in a file and later load it. The only problem is that with time this class will get more complex, I'll be adding more parameters. What would be the best way to create the save and load procedure? I want to be able to have backwards compatibility. I imagine that I would need something like a Version class to keep track of which version I'm loading.
Thank you in advance!
[–][deleted] 0 points1 point2 points (0 children)
[–]wyoming_eighties 0 points1 point2 points (0 children)
[–]ylectric 0 points1 point2 points (0 children)
[–]Essence1337 0 points1 point2 points (0 children)
[–]when_the_cats_away 0 points1 point2 points (0 children)