/[opental]/opental/OpenTAL/Context.py
ViewVC logotype

Diff of /opental/OpenTAL/Context.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by lalo, Fri Jan 17 01:33:19 2003 UTC revision 1.3 by lalo, Wed Feb 5 02:47:51 2003 UTC
# Line 63  class SafeMapping(MultiMapping): Line 63  class SafeMapping(MultiMapping):
63          def __init__(self, *a):          def __init__(self, *a):
64              self._stack = list(a)              self._stack = list(a)
65              self._stack.reverse()              self._stack.reverse()
66              self._push = self._stack.push  
67              self._pop = self._stack.pop          def _push(self, d):
68                self._stack.insert(0, d)
69    
70            def _pop(self):
71                return self._stack.pop(0)
72    
73          def get(self, name, default=None):          def get(self, name, default=None):
74              for layer in self._stack:              for layer in self._stack:
# Line 249  class Context: Line 253  class Context:
253                  object = object(*name)                  object = object(*name)
254                  continue                  continue
255    
             if not name or name[0] == '_':  
                 # Skip directly to item access  
                 o = object[name]  
                 # Check access to the item.  
                 validate(object, object, name, o)  
                 object = o  
                 continue  
   
256              if name=='..':              if name=='..':
257                  o = getattr(object, 'aq_parent', _marker)                  o = getattr(object, 'aq_parent', _marker)
258                  if o is not _marker:                  if o is not _marker:

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26