Property decorator for python


Version: 2.4
Category:
Scripts
Python
Requirements:
Seller:
Price:
-
System:
Rating:
4.5
License:

Description - Property decorator for python



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.



More in Python-Property decorator for python

Decorator Python Older Recipe Decorated Function Instead