I am am worrying a problem here, where I need to store references to objects in my own objects, while at the same time needing to store and retreive my objects later.

Here is an example of what I need to do:

in a product BooTool for Zope I have:

class Foo:

  def __init__(self, data, ref_a):
    self.data = data
    self.a_handle = ref_a
    self.stuff = []

  def bar(self):
    # do something with self.stuff
    cool = self.a_handle('one')
    return self.stuff

def getStuff(data, ref_a):
  """ his method is available to Zope from the tool boo_tool """
  return Foo(data, ref_a)

in a python script I have a pythonscript:

my_ob = context.boo_tool.getStuff('123', container.my_script)
return my_ob

so my_ob contains a reference to the my_script Pythonscript/ZSQL Method.

What happens if I store my_ob in a session storage for instance and later retrieve it and do my_ob.bar() ?

What bad things can happen?

Thanks for any input.


-- -------------------------------------------------------------------
Dario Lopez-Kšsten, IT Systems & Services Chalmers University of Tech.

_______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )

Reply via email to