Example #1
0
 def __enter__(self):
     if not hasattr(_per_thread, "stack"):
         _per_thread.stack = []
     _per_thread.stack.append(self)
     self._rec = hypertext.recording()
     self._roots = self._rec.__enter__()
     return self
Example #2
0
 def __enter__(self):
     if not hasattr(_per_thread, "stack"):
         _per_thread.stack = []
     _per_thread.stack.append(self)
     self._rec = hypertext.recording()
     self._roots = self._rec.__enter__()
     return self
Example #3
0
File: page.py Project: genba/minima
 def __enter__(self):
     if hasattr(self, "_rec"):
         raise TypeError("%r cannot be recursively embedded" % (self, ))
     self._rec = hypertext.recording()
     self._roots = self._rec.__enter__()
     return self
Example #4
0
 def __enter__(self):
     if hasattr(self, "_rec"):
         raise TypeError("%r cannot be recursively embedded" % (self,))
     self._rec = hypertext.recording()
     self._roots = self._rec.__enter__()
     return self