Commits

Anonymous committed 3b4a7af

Documentation updates.

  • Participants
  • Parent commits cbdeff3

Comments (0)

Files changed (2)

File docs/local.rst

 cleans up it will clean up all the data left in the locals for this
 context.
 
+.. autofunction:: release_local
+
 .. autoclass:: LocalManager
    :members: cleanup, make_middleware, middleware, get_ident
 
+.. autoclass:: LocalStack
+   :members: stack, push, pop, top
+
 .. autoclass:: LocalProxy
    :members: _get_current_object
 

File werkzeug/local.py

 
     @property
     def stack(self):
+        """The current context's stack as list"""
         self._lock.acquire()
         try:
             rv = getattr(self._local, 'stack', None)
             self._lock.release()
 
     def push(self, obj):
+        """Pushes a new item to the stack"""
         self.stack.append(obj)
 
     def pop(self):
+        """Removes the topmost item from the stack, will return the
+        old value or `None` if the stack was already empty.
+        """
         try:
             return self.stack.pop()
         except IndexError:
 
     @property
     def top(self):
+        """The topmost item on the stack.  If the stack is empty,
+        `None` is returned.
+        """
         try:
             return self.stack[-1]
         except IndexError:
             raise RuntimeError('no object bound to %s' % self.__name__)
     __current_object = property(_get_current_object)
 
+    @property
     def __dict__(self):
         try:
             return self.__current_object.__dict__
         except RuntimeError:
             return AttributeError('__dict__')
-    __dict__ = property(__dict__)
 
     def __repr__(self):
         try: