def lazyproperty(f):
    cache_attr_name = '_%s' % f.__name__  # like '_foobar' for prop 'foobar'
    docstring = f.__doc__

    def get_prop_value(obj):
        try:
            return getattr(obj, cache_attr_name)
        except AttributeError:
            value = f(obj)
            setattr(obj, cache_attr_name, value)
            return value

    return property(get_prop_value, doc=docstring)
On a options set request a form is required.
dataset/ETHPy150Open scanny/python-pptx/pptx/util.py/lazyproperty--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubRequestTest.test_fromElementOptionsSetNoForm