Back to index

moin  1.9.0~rc2
Public Member Functions | Properties | Private Member Functions | Static Private Attributes Class Reference

List of all members.

Public Member Functions

def __init__
def __dict__
def __repr__
def __nonzero__
def __unicode__
def __dir__
def __getattr__
def __setitem__
def __delitem__
def __setslice__
def __delslice__


 __current_object = property(_get_current_object)
 __dict__ = property(__dict__)

Private Member Functions

def _get_current_object

Static Private Attributes

tuple __slots__ = ('__local', '__dict__', '__name__')
tuple __setattr__ = lambdax,n,v:setattr(x.__current_object, n, v)
tuple __delattr__ = lambdax,n:delattr(x.__current_object, n)
tuple __str__ = lambdax:str(x.__current_object)
 __lt__ = lambdax,o:x.__current_object<o
 __le__ = lambdax,o:x.__current_object<o
 __eq__ = lambdax,o:x.__current_objecto
 __ne__ = lambdax,o:x.__current_object!o
 __gt__ = lambdax,o:x.__current_object>o
 __ge__ = lambdax,o:x.__current_object>o
tuple __cmp__ = lambdax,o:cmp(x.__current_object, o)
tuple __hash__ = lambdax:hash(x.__current_object)
tuple __call__ = lambdax,*a,**kw:x.__current_object(*a, **kw)
tuple __len__ = lambdax:len(x.__current_object)
list __getitem__ = lambdax,i:x.__current_object[i]
tuple __iter__ = lambdax:iter(x.__current_object)
 __contains__ = lambdax,i:iinx.__current_object
list __getslice__ = lambdax,i,j:x.__current_object[i:j]
 __add__ = lambdax,o:x.__current_object+o
 __sub__ = lambdax,o:x.__current_object-o
 __mul__ = lambdax,o:x.__current_object*o
 __floordiv__ = lambdax,o:x.__current_object//o
 __mod__ = lambdax,o:x.__current_object%o
tuple __divmod__ = lambdax,o:x.__current_object.__divmod__(o)
 __pow__ = lambdax,o:x.__current_object**o
 __lshift__ = lambdax,o:x.__current_object<<o
 __rshift__ = lambdax,o:x.__current_object>>o
 __and__ = lambdax,o:x.__current_object&o
 __xor__ = lambdax,o:x.__current_object^o
 __or__ = lambdax,o:x.__current_object|o
tuple __div__ = lambdax,o:x.__current_object.__div__(o)
tuple __truediv__ = lambdax,o:x.__current_object.__truediv__(o)
tuple __neg__ = lambdax:-(x.__current_object)
tuple __pos__ = lambdax:+(x.__current_object)
tuple __abs__ = lambdax:abs(x.__current_object)
tuple __invert__ = lambdax:~(x.__current_object)
tuple __complex__ = lambdax:complex(x.__current_object)
tuple __int__ = lambdax:int(x.__current_object)
tuple __long__ = lambdax:long(x.__current_object)
tuple __float__ = lambdax:float(x.__current_object)
tuple __oct__ = lambdax:oct(x.__current_object)
tuple __hex__ = lambdax:hex(x.__current_object)
tuple __index__ = lambdax:x.__current_object.__index__()
tuple __coerce__ = lambdax,o:x.__coerce__(x, o)
tuple __enter__ = lambdax:x.__enter__()
tuple __exit__ = lambdax,*a,**kw:x.__exit__(*a, **kw)

Detailed Description

Acts as a proxy for a werkzeug local.  Forwards all operations to
a proxied object.  The only operations not supported for forwarding
are right handed operands and any kind of assignment.

Example usage::

    from werkzeug import Local
    l = Local()
    request = l('request')
    user = l('user')

Whenever something is bound to l.user / l.request the proxy objects
will forward all operations.  If no object is bound a `RuntimeError`
will be raised.

Definition at line 202 of file

Constructor & Destructor Documentation

def (   self,

Definition at line 220 of file

00221     def __init__(self, local, name):
00222         object.__setattr__(self, '_LocalProxy__local', local)
00223         object.__setattr__(self, '__name__', name)

Member Function Documentation

Definition at line 275 of file

00276     def __delitem__(self, key):
00277         del self.__current_object[key]

Definition at line 281 of file

00282     def __delslice__(self, i, j):
00283         del self.__current_object[i:j]

Definition at line 235 of file

00236     def __dict__(self):
00237         try:
00238             return self.__current_object.__dict__
00239         except RuntimeError:
            return AttributeError('__dict__')

Here is the caller graph for this function:

Definition at line 261 of file

00262     def __dir__(self):
00263         try:
00264             return dir(self.__current_object)
00265         except RuntimeError:
00266             return []

Definition at line 267 of file

00268     def __getattr__(self, name):
00269         if name == '__members__':
00270             return dir(self.__current_object)
00271         return getattr(self.__current_object, name)

Definition at line 249 of file

00250     def __nonzero__(self):
00251         try:
00252             return bool(self.__current_object)
00253         except RuntimeError:
00254             return False

Definition at line 242 of file

00243     def __repr__(self):
00244         try:
00245             obj = self.__current_object
00246         except RuntimeError:
00247             return '<%s unbound>' % self.__class__.__name__
00248         return repr(obj)

def (   self,

Definition at line 272 of file

00273     def __setitem__(self, key, value):
00274         self.__current_object[key] = value

Here is the caller graph for this function:

def (   self,

Definition at line 278 of file

00279     def __setslice__(self, i, j, seq):
00280         self.__current_object[i:j] = seq

Definition at line 255 of file

00256     def __unicode__(self):
00257         try:
00258             return unicode(self.__current_object)
00259         except RuntimeError:
00260             return repr(self)

Return the current object.  This is useful if you want the real
object behind the proxy at a time for performance reasons or because
you want to pass the object into a different context.

Definition at line 224 of file

00225     def _get_current_object(self):
00226         """Return the current object.  This is useful if you want the real
00227         object behind the proxy at a time for performance reasons or because
00228         you want to pass the object into a different context.
00229         """
00230         try:
00231             return getattr(self.__local, self.__name__)
00232         except AttributeError:
            raise RuntimeError('no object bound to %s' % self.__name__)

Member Data Documentation

tuple = lambdax:abs(x.__current_object) [static, private]

Definition at line 317 of file = lambdax,o:x.__current_object+o [static, private]

Definition at line 301 of file = lambdax,o:x.__current_object&o [static, private]

Definition at line 310 of file

tuple = lambdax,*a,**kw:x.__current_object(*a, **kw) [static, private]

Definition at line 295 of file

tuple = lambdax,o:cmp(x.__current_object, o) [static, private]

Definition at line 293 of file

tuple = lambdax,o:x.__coerce__(x, o) [static, private]

Definition at line 326 of file

tuple = lambdax:complex(x.__current_object) [static, private]

Definition at line 319 of file = lambdax,i:iinx.__current_object [static, private]

Definition at line 299 of file

tuple = lambdax,n:delattr(x.__current_object, n) [static, private]

Definition at line 285 of file

tuple = lambdax,o:x.__current_object.__div__(o) [static, private]

Definition at line 313 of file

tuple = lambdax,o:x.__current_object.__divmod__(o) [static, private]

Definition at line 306 of file

tuple = lambdax:x.__enter__() [static, private]

Definition at line 327 of file = lambdax,o:x.__current_objecto [static, private]

Definition at line 289 of file

tuple = lambdax,*a,**kw:x.__exit__(*a, **kw) [static, private]

Definition at line 328 of file

tuple = lambdax:float(x.__current_object) [static, private]

Definition at line 322 of file = lambdax,o:x.__current_object//o [static, private]

Definition at line 304 of file = lambdax,o:x.__current_object>o [static, private]

Definition at line 292 of file

list = lambdax,i:x.__current_object[i] [static, private]

Definition at line 297 of file

list = lambdax,i,j:x.__current_object[i:j] [static, private]

Definition at line 300 of file = lambdax,o:x.__current_object>o [static, private]

Definition at line 291 of file

tuple = lambdax:hash(x.__current_object) [static, private]

Definition at line 294 of file

tuple = lambdax:hex(x.__current_object) [static, private]

Definition at line 324 of file

tuple = lambdax:x.__current_object.__index__() [static, private]

Definition at line 325 of file

tuple = lambdax:int(x.__current_object) [static, private]

Definition at line 320 of file

tuple = lambdax:~(x.__current_object) [static, private]

Definition at line 318 of file

tuple = lambdax:iter(x.__current_object) [static, private]

Definition at line 298 of file = lambdax,o:x.__current_object<o [static, private]

Definition at line 288 of file

tuple = lambdax:len(x.__current_object) [static, private]

Definition at line 296 of file

tuple = lambdax:long(x.__current_object) [static, private]

Definition at line 321 of file = lambdax,o:x.__current_object<<o [static, private]

Definition at line 308 of file = lambdax,o:x.__current_object<o [static, private]

Definition at line 287 of file = lambdax,o:x.__current_object%o [static, private]

Definition at line 305 of file = lambdax,o:x.__current_object*o [static, private]

Definition at line 303 of file = lambdax,o:x.__current_object!o [static, private]

Definition at line 290 of file

tuple = lambdax:-(x.__current_object) [static, private]

Definition at line 315 of file

tuple = lambdax:oct(x.__current_object) [static, private]

Definition at line 323 of file = lambdax,o:x.__current_object|o [static, private]

Definition at line 312 of file

tuple = lambdax:+(x.__current_object) [static, private]

Definition at line 316 of file = lambdax,o:x.__current_object**o [static, private]

Definition at line 307 of file = lambdax,o:x.__current_object>>o [static, private]

Definition at line 309 of file

tuple = lambdax,n,v:setattr(x.__current_object, n, v) [static, private]

Definition at line 284 of file

tuple = ('__local', '__dict__', '__name__') [static, private]

Definition at line 218 of file

tuple = lambdax:str(x.__current_object) [static, private]

Definition at line 286 of file = lambdax,o:x.__current_object-o [static, private]

Definition at line 302 of file

tuple = lambdax,o:x.__current_object.__truediv__(o) [static, private]

Definition at line 314 of file = lambdax,o:x.__current_object^o [static, private]

Definition at line 311 of file

Property Documentation

Definition at line 233 of file

Definition at line 240 of file

The documentation for this class was generated from the following file: