| Start |
|---|
| Using the @property decorator for read-write properties If you want to use To use this: |
| Using the @property decorator The Given some module Then |
| Overriding just a getter, setter or a deleter of a property object When you inherit from a class with a property, you can provide a new implementation for one or more of the property You can also add a setter or deleter where there was not one on the base class before. |
| Using properties without decorators While using decorator syntax (with the @) is convenient, it also a bit concealing. You can use properties directly, without decorators. The following Python 3.x example shows this: RemarksNote: In Python 2, make sure that your class inherits from object (making it a new-style class) in order for all features of properties to be available. |
Read Article
https://develop.horje.com/learn/1434/reference