On Mar 24, 2011, at 8:25 AM, Anthony wrote:
> There is an additional problem, though. According to Massimo, web2py cannot 
> store instances of classes in the session: 
> https://groups.google.com/d/msg/web2py/dmN54cpMuXo/lufvxmaQMLUJ. Perhaps 
> Massimo has more to say regarding this example.
> 

This is what Massimo wrote in that thread:

> In web2py you cannot store instances of objects into session. While 
> Armin makes it tool like this is a web2py problem this is more complex 
> and general than that. In Python if you pickle and object that is 
> instance of a class defined in /path1/mymodule.py and then you 
> unpickle on a different installation where the class is defined in / 
> path2/mymodule.py you may run into problems. Because web2py does not 
> require installation (it is a feature) and has hot plug and play of 
> apps (another feature) we cannot pickle instances (the price we pay 
> for those features). To me it is worth it. 

I'd like to know a little more as well. It seems to me that since sessions are 
relatively transient (you're not going to preserve sessions if you move web2py 
elsewhere), the path to the class isn't going to change between session 
accesses.

Reply via email to