From 9d4db868a5fa5c6ee2d78a60d54a4b36a5c3e5de Mon Sep 17 00:00:00 2001 From: alex_nanou Date: Tue, 7 Sep 2004 21:51:47 +0000 Subject: [PATCH] *** empty log message *** --- CHANGES | 2 +- pli/pattern/proxy/generic.py | 12 ++++++++---- pli/pattern/store/store.py | 6 +++--- pli/pattern/store/stored.py | 11 ++++++++++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 456b45b..d7e6a69 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -# this file was generated on [200409061741] +# this file was generated on [200409080150] pli changes: version 0.0.83 (200409060449): diff --git a/pli/pattern/proxy/generic.py b/pli/pattern/proxy/generic.py index ce01688..5e95d8e 100644 --- a/pli/pattern/proxy/generic.py +++ b/pli/pattern/proxy/generic.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.11''' -__sub_version__ = '''20040906174006''' +__sub_version__ = '''20040908015008''' __copyright__ = '''(c) Alex A. Naanou 2003''' @@ -85,7 +85,7 @@ class AbstractProxy(object): def __repr__(self): ''' ''' - return '<%s proxy at %s to %s>' % (self.__class__.__name__, + return '<%s proxy at %s to %s>' % (object.__getattribute__(self, '__class__').__name__, hex(id(self)), repr(getattr(self, self.__proxy_target_attr_name__))) @@ -129,6 +129,10 @@ class ComparibleProxy(AbstractProxy): #---------------------------------------------------------CachedProxy--- +# TODO write a more elaborate cache manager... (wee need to take into +# consideration, input args... etc.) +# might be good to make an "iscached" predicate... +# class CachedProxy(AbstractProxy): ''' ''' @@ -247,9 +251,9 @@ class InheritAndOverrideProxy(AbstractProxy): #-----------------------------------TranparentInheritAndOverrideProxy--- - +# this is the Proxy cache... _TranparentInheritAndOverrideProxy_cache = weakref.WeakKeyDictionary() - +#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Q: do we need any other magic methods??? class TranparentInheritAndOverrideProxy(InheritAndOverrideProxy, ComparibleProxy): ''' diff --git a/pli/pattern/store/store.py b/pli/pattern/store/store.py index d2d3e01..9aa7791 100644 --- a/pli/pattern/store/store.py +++ b/pli/pattern/store/store.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.47''' -__sub_version__ = '''20040820033403''' +__sub_version__ = '''20040907144201''' __copyright__ = '''(c) Alex A. Naanou 2003''' @@ -39,8 +39,8 @@ def isstoredtype(store, name): # argument... # TODO rename to MappingBaseStore... # -##class BaseStore(mapping.Mapping, mapping.BasicMappingProxy): -class BaseStore(mapping.MappingWithMethods, mapping.BasicMappingProxy): +class BaseStore(mapping.Mapping, mapping.BasicMappingProxy): +##class BaseStore(mapping.MappingWithMethods, mapping.BasicMappingProxy): ''' ''' # if this is true strict object type checking will be enabled... diff --git a/pli/pattern/store/stored.py b/pli/pattern/store/stored.py index 8d9a0eb..a48e833 100644 --- a/pli/pattern/store/stored.py +++ b/pli/pattern/store/stored.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.11''' -__sub_version__ = '''20040709022614''' +__sub_version__ = '''20040907143557''' __copyright__ = '''(c) Alex A. Naanou 2003''' @@ -114,6 +114,15 @@ class _StoredObject(_StoredClass): getattr(cls, cls.__object_store_attr_name__)[name] = obj +#---------------------------------------------------------StoredClass--- +class StoredClass(object): + ''' + ''' + __metaclass__ = _StoredClass + + __ignore_registration__ = True + + #--------------------------------------------------------StoredObject--- # TODO add onStoredObjectLoad, onStoredObjectSave, # onStoredObjectReload, .... events... -- 2.11.4.GIT