OpenQuizz
Une application de gestion des contenus pédagogiques
werkzeug.local Namespace Reference

Data Structures

class  Local
 
class  LocalManager
 
class  LocalProxy
 
class  LocalStack
 

Functions

def release_local (local)
 

Function Documentation

◆ release_local()

def werkzeug.local.release_local (   local)
Releases the contents of the local for the current context.
This makes it possible to use locals without a manager.

Example::

    >>> loc = Local()
    >>> loc.foo = 42
    >>> release_local(loc)
    >>> hasattr(loc, 'foo')
    False

With this function one can release :class:`Local` objects as well
as :class:`LocalStack` objects.  However it is not possible to
release data held by proxies that way, one always has to retain
a reference to the underlying local object in order to be able
to release it.

.. versionadded:: 0.6.1