[Erp5-report] r39756 nicolas.dumazet - /erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Nov 2 08:44:19 CET 2010
Author: nicolas.dumazet
Date: Tue Nov 2 08:44:18 2010
New Revision: 39756
URL: http://svn.erp5.org?rev=39756&view=rev
Log:
improve docstrings
Modified:
erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
Modified: erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/lazy_class.py?rev=39756&r1=39755&r2=39756&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] Tue Nov 2 08:44:18 2010
@@ -17,13 +17,16 @@ ERP5BaseBroken = type('ERP5BaseBroken',
class GhostPortalType(ERP5Base): #SimpleItem
"""
- Ghost state for a portal type that is not loaded.
+ Ghost state for a portal type class that is not loaded.
- One instance of this class exists per portal type class on the system.
- When an object of this portal type is loaded (a new object is created,
- or an attribute of an existing object is accessed) this class will
- change the bases of the portal type class so that it points to the
- correct Document+Mixin+interfaces+AccessorHolder classes.
+ When an instance of this portal type class is loaded (a new object is
+ created, or an attribute of an existing object is accessed) this class will
+ force loading the portal type real inheritance and properties from the ZODB.
+
+ The portal type class will then update its __bases__ so that it points to
+ the correct Document+Mixin+interfaces+AccessorHolder classes: after the first
+ load, a portal type class does not use GhostPortalType in its __bases__
+ anymore.
"""
def __init__(self, *args, **kw):
self.__class__.loadClass()
@@ -53,7 +56,10 @@ class GhostPortalType(ERP5Base): #Simple
class PortalTypeMetaClass(ExtensionClass):
"""
- Meta class that will be used by portal type classes
+ Meta class that is used by portal type classes
+
+ - Tracks subclasses of portal type classes
+ - Takes care of ghosting/unghosting
"""
# register which classes subclass portal type classes
More information about the Erp5-report
mailing list