Jonathan wrote at 2007-7-7 08:55 -0400:
> ...
>Just one caveat:  you cannot define a class within an external method and 
>then return an instance of that class (the routine that invoked the external 
>method will not have any reference to the instance's class).

You can.

You must, however, be aware that such classes are not picklable.

   The source of "External Method"s are read in ("execfile"d) and
   classes defined therein appear as if defined in the module "__main__".
   This confused the pickling mechanis as "__main__" is unable
   to recreate these classes.



-- 
Dieter
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to