Python Programming Learning Circle
Mar 15, 2022 · Fundamentals
Implementing Lazy Properties in Python with Descriptors and @property
This article explains the concept of lazy initialization in Python, reviews the @property decorator, and provides two complete implementations—a descriptor class and a decorator function—to create lazy properties that compute a value only once and then cache it for subsequent accesses.
PerformanceTutorialdescriptor
0 likes · 5 min read