Exemple #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
Exemple #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
Exemple #3
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
Exemple #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