PNG
IHDR ; IDATxܻn0K
)(pA7LeG{ §㻢|ذaÆ
6lذaÆ
6lذaÆ
6lom$^yذag5 bÆ
6lذaÆ
6lذa{
6lذaÆ
`}HFkm,mӪôô!x|'ܢ˟;E:9&ᶒ}{v]n&6
h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%tMז -lG6mrz2s%9s@-k9=)kB5\+͂ZsٲRn~GRCwIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL /F*\Ԕ#"5m2[S=gnaPeғL
lذaÆ
6l^ḵaÆ
6lذaÆ
6lذa;
_ذaÆ
6lذaÆ
6lذaÆ
R IENDB`
babel.support.LazyProxy
Class LazyProxy
object --+
|
LazyProxy
Class for proxy objects that delegate to a specified function to evaluate
the actual object.
>>> def greeting (name='world' ):
... return 'Hello, %s!' % name
>>> lazy_greeting = LazyProxy(greeting, name='Joe' )
>>> print lazy_greeting
Hello, Joe!
>>> u' ' + lazy_greeting
u' Hello, Joe!'
>>> u'(%s)' % lazy_greeting
u'(Hello, Joe!)'
This can be used, for example, to implement lazy translation functions that
delay the actual translation until the string is actually used. The
rationale for such behavior is that the locale of the user may not always
be available. In web applications, you only know the locale when processing
a request.
The proxy implementation attempts to be as complete as possible, so that
the lazy objects should mostly work as expected, for example for sorting:
>>> greetings = [
... LazyProxy(greeting, 'world' ),
... LazyProxy(greeting, 'Joe' ),
... LazyProxy(greeting, 'universe' ),
... ]
>>> greetings.sort()
>>> for greeting in greetings:
... print greeting
Hello, Joe!
Hello, universe!
Hello, world!
__init__ (self ,
func ,
*args ,
**kwargs )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
__call__ (self ,
*args ,
**kwargs )
__delattr__ (self ,
name )
x.__delattr__('name') <==> del x.name
__setattr__ (self ,
name ,
value )
x.__setattr__('name', value) <==> x.name = value
__setitem__ (self ,
key ,
value )
Inherited from object
:
__format__
,
__getattribute__
,
__hash__
,
__new__
,
__reduce__
,
__reduce_ex__
,
__repr__
,
__sizeof__
,
__subclasshook__
value
Inherited from object
:
__class__
__init__ (self ,
func ,
*args ,
**kwargs )
(Constructor)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
object.__init__
(inherited documentation)
__str__ (self )
(Informal representation operator)
str(x)
Overrides:
object.__str__
(inherited documentation)
x.__delattr__('name') <==> del x.name
Overrides:
object.__delattr__
(inherited documentation)
__setattr__ (self ,
name ,
value )
x.__setattr__('name', value) <==> x.name = value
Overrides:
object.__setattr__
(inherited documentation)
value
Get Method:
unreachable .value(self )