On 17-04-2014, Michael Merickel wrote:
> --047d7bfcfc9832ef9104f742b2a6
> Content-Type: text/plain; charset=UTF-8
>
> You could annotate the request with some other property (request.called_foo
>= True) and check if getattr(request, 'called_foo') in the tween.
>
> However, if you're okay relying on an implementation detail of reify then
> the following works:
>
> class Foo(object):
>     @reify
>     def bar(self):
>         return 42
>
> foo = Foo()
> print 'bar' in foo.__dict__ # -> False
> foo.bar
> print 'bar' in foo.__dict__ # -> True
>
>

I will not use it if it's not a public api but it's interresting to 
know, thanks.

-- 
William

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to