File manager - Edit - /opt/imh-python/lib/python2.7/site-packages/werkzeug/local.pyo
Back
� �ْSc @ s d Z d d l m Z d d l m Z d d l m Z m Z y d d l m Z WnI e k r� y d d l m Z Wq� e k r� d d l m Z q� Xn Xd � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ e d e f d � � Y� Z d S( s� werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i����( t update_wrapper( t ClosingIterator( t PY2t implements_bool( t getcurrent( t get_identc C s | j � d S( sM 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 N( t __release_local__( t local( ( s= /opt/imh-python/lib/python2.7/site-packages/werkzeug/local.pyt release_local s t Localc B sM e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( t __storage__t __ident_func__c C s* t j | d i � t j | d t � d S( NR R ( t objectt __setattr__R ( t self( ( s= /opt/imh-python/lib/python2.7/site-packages/werkzeug/local.pyt __init__5 s c C s t | j j � � S( N( t iterR t items( R ( ( s= /opt/imh-python/lib/python2.7/site-packages/werkzeug/local.pyt __iter__9 s c C s t | | � S( s Create a proxy for a name.( t LocalProxy( R t proxy( ( s= /opt/imh-python/lib/python2.7/site-packages/werkzeug/local.pyt __call__<