Hi, I have a dtml method that returns a python list (actually a list of lists) and I would like to store this list as a persistent object. I need to make a lot of these so it should be lightweight. Is there a Product that does this? Any tips for writing one? Am I missing something obvious? Thanks for any suggestions! Ken
ken@practical.org wrote at 2003-10-4 13:34 +0200:
I have a dtml method that returns a python list (actually a list of lists) and I would like to store this list as a persistent object. I need to make a lot of these so it should be lightweight.
Is there a Product that does this?
Any persistent instance can store a list (and it becomes persistent). You must be careful however, when you change the list to tell the object that it changed. Alternatively, you can use a "ZODB.PersistentList.PersistentList". In this case, the list itself is persistent and modifications to it are automatically written to the storage. Modifications to sublists are not automatically recognized, though. Dieter
participants (2)
-
Dieter Maurer -
ken@practical.org