som = SOM_CLASS() # includes many big difficult data structures
som.hard_work()
som.save_to_disk(filename)
#then later or another program
som = SOM_CLASS()
som.read_from_file(filename)
som.do_anythink_else()
hoặclàm thế nào để tiết kiệm/lớp đọc hoàn toàn bằng Python
som = SOM_CLASS()
save(som)
#...
load(som)
som.work()
Cách đơn giản nhất để làm điều này là gì?
Bất kỳ yêu cầu nào khác? Tốc độ/kích thước/bảo mật/tính di động? http://docs.python.org/library/json.html có thể là một tùy chọn. – voyager
yêu cầu = dễ dàng và nhanh chóng để làm điều này một công việc khác) – Mike