MemotivaProperties, descriptors, and slots

What is a property in Python?

Properties, descriptors, and slots

Audio flashcard · 0:16

Nortren·

What is a property in Python?

0:16

A property is a way to expose attribute-like access while running custom code on get, set, or delete. It is defined using the property decorator on a getter method, with optional setter and deleter. Properties allow you to add validation or computation while preserving a clean attribute interface.
docs.python.org