[Modeling-cvs] ProjectModeling/Modeling utils.py,1.14,1.15
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-07-24 11:09:13
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv21647 Modified Files: utils.py Log Message: Changed: MDL_ENABLE_SIMPLE_METHOD_CACHE should be set to enable caching of models and class descriptions. This prevents existing code to be broken when no action is taken --that was not the case when one had to explicitely set MDL_DISABLE_SIMPLE_METHOD_CACHE to disable it Index: utils.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/utils.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** utils.py 23 Jul 2003 20:58:41 -0000 1.14 --- utils.py 24 Jul 2003 11:09:08 -0000 1.15 *************** *** 195,199 **** """ import os ! if os.environ.get('MDL_DISABLE_SIMPLE_METHOD_CACHE', None): return from new import instancemethod --- 195,199 ---- """ import os ! if not os.environ.get('MDL_ENABLE_SIMPLE_METHOD_CACHE', None): return from new import instancemethod *************** *** 201,206 **** try: res=m(anInstance) ! except (NotImplementedError, 'Unimplemented','Nonsense'): ! pass l=lambda self, res=res: res cached_m=instancemethod(l, anInstance, anInstance.__class__) --- 201,206 ---- try: res=m(anInstance) ! except (NotImplementedError, 'Unimplemented', "Nonsense"): ! continue l=lambda self, res=res: res cached_m=instancemethod(l, anInstance, anInstance.__class__) |