Storing objects with SQLSession
Is there a way to store complex objects in session objects, or SQLSession can store string values? I have not tested so far FSSession, but its announcement states that it is capable of storing lists (I suppose list of strings only). Does SQLSession also support storing list of strings? NM
On Tue, 4 Jan 2000, Nemeth Miklos wrote:
Is there a way to store complex objects in session objects, or SQLSession can store string values? I have not tested so far FSSession, but its announcement states that it is capable of storing lists (I suppose list of strings only). Does SQLSession also support storing list of strings?
As far as I remember SQLSession pickles all cookies so you can store nearly any arbitrary python object, including instances. FSSession marshals data which is faster than pickle but it cannot store complex objects. However you can still store any combination of basic python objects since they are marshalable, for instance: ['one',1,['two',2.0],{'three':(3.1,)}] is ok. For more info on marshalable/picklable objects check the python lib doc. Pavlos
participants (2)
-
Nemeth Miklos -
Pavlos Christoforou