This recipe refines an older recipe on creating class properties . The refinement consists of: - Using a decorator (introduced in python 2.4) to "Declare" a function in class scope as property. - Using a trace function to Capture the locals() of the decorated function, instead of requiring the latter to return locals(), as in the older recipe.