Beispiel #1
0
    class A:
        reentrant_context_manager = CachedProperty(
            lambda self: get_depth_counting_context_manager())

        @reentrant_context_manager
        def my_method(self, x, y=3):
            return (x, y, self.reentrant_context_manager.depth)
Beispiel #2
0
    class A:
        reentrant_context_manager = CachedProperty(
            lambda self: context_management.ReentrantContextManager())

        @reentrant_context_manager
        def my_method(self, x, y=3):
            return (x, y, self.reentrant_context_manager.depth)
Beispiel #3
0
 class A:
     personality = CachedProperty(counting_func, name='meow')
Beispiel #4
0
 class B:
     brrr_property = CachedProperty('brrr')
Beispiel #5
0
 class A:
     personality = CachedProperty(counting_func)
Beispiel #6
0
 class A:
     personality = CachedProperty(counting_func,
                                  force_value_not_getter=True)
Beispiel #7
0
 class C:
     undocced_property = CachedProperty(lambda self: 1 / 0, )
Beispiel #8
0
 class B:
     personality = CachedProperty(counting_func, doc='''Ooga booga.''')
Beispiel #9
0
 class A(object):
     personality = CachedProperty(counting_func, name='personality')
Beispiel #10
0
 class B(object):
     brrr_property = CachedProperty('brrr')
Beispiel #11
0
 class C(object):
     undocced_property = CachedProperty(lambda self: 1 / 0, )