Tag

property

0 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Jan 21, 2025 · Fundamentals

Master Python Classes: Inheritance, Composition, and Advanced OOP Techniques

This guide explores Python class fundamentals, covering inheritance versus composition, the use of super(), distinctions among instance, class, and static methods, dataclasses, the __dict__ attribute, name mangling, @property, dynamic class creation with type(), and __slots__ for attribute control.

ClassesOOPPython
0 likes · 9 min read
Master Python Classes: Inheritance, Composition, and Advanced OOP Techniques
Test Development Learning Exchange
Test Development Learning Exchange
Oct 15, 2023 · Fundamentals

Python Property Access and Descriptor Magic Methods

This article explains Python's property access protocols and descriptor mechanisms, demonstrating how to customize attribute behavior using special methods like __getattribute__ and __getattr__.

OOPPythondescriptor
0 likes · 5 min read
Python Property Access and Descriptor Magic Methods
Test Development Learning Exchange
Test Development Learning Exchange
Aug 2, 2023 · Fundamentals

10 Practical Python Metaprogramming Scenarios Using __getattr__, __setattr__, and Descriptors

This article presents ten useful Python metaprogramming examples that demonstrate dynamic attribute access, setting, descriptor‑based validation, runtime attribute creation and deletion, computed properties, dynamic class and method generation, and metaclass techniques for flexible program behavior.

Pythoncode examplesdescriptors
0 likes · 6 min read
10 Practical Python Metaprogramming Scenarios Using __getattr__, __setattr__, and Descriptors
Python Programming Learning Circle
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.

PerformancePythonTutorial
0 likes · 5 min read
Implementing Lazy Properties in Python with Descriptors and @property
Tencent Cloud Developer
Tencent Cloud Developer
Feb 24, 2022 · Fundamentals

Understanding Property Registration and Runtime Access in a C++ Reflection Framework

The article dissects the Ponder C++ reflection library’s Property subsystem, explaining how registration via ClassBuilder creates property entries, how traits and ValueBinders map members to abstract Property objects, and how runtime Get/Set calls traverse templated binders to provide type‑safe, high‑performance access.

C++Template Metaprogrammingproperty
0 likes · 16 min read
Understanding Property Registration and Runtime Access in a C++ Reflection Framework
IT Services Circle
IT Services Circle
Feb 6, 2022 · Fundamentals

Using Python Descriptors to Enforce the Single Responsibility Principle

This article explains what Python descriptors are, why they help follow the Single Responsibility Principle, and demonstrates how to replace repetitive property setters with reusable descriptor classes such as a fuel‑capacity validator and a generic range‑checking descriptor.

Pythonbackenddescriptors
0 likes · 4 min read
Using Python Descriptors to Enforce the Single Responsibility Principle
Python Programming Learning Circle
Python Programming Learning Circle
Jul 21, 2021 · Fundamentals

Understanding Python's __dict__ System, Properties, and Dynamic Attribute Generation

This article explains Python's __dict__ attribute storage, class and instance attributes, demonstrates how to inspect and modify them, introduces properties using the built‑in property() function, and shows dynamic attribute generation with __getattr__, providing clear code examples and explanations.

Python__dict__attributes
0 likes · 9 min read
Understanding Python's __dict__ System, Properties, and Dynamic Attribute Generation
Byte Quality Assurance Team
Byte Quality Assurance Team
Jun 23, 2021 · Fundamentals

Understanding Python Properties and Descriptors

This article explains Python's property decorator and descriptor protocol, showing how to turn methods into managed attributes, perform validation, compute derived values, and illustrates their implementation with clear code examples including a Student class, a custom descriptor, and a classmethod reimplementation.

Code ExampleOOPPython
0 likes · 8 min read
Understanding Python Properties and Descriptors
ByteFE
ByteFE
May 11, 2021 · Frontend Development

Leveraging CSS @property (Houdini) for Advanced Animations and Custom Property Control

This article introduces the CSS @property at‑rule, explains how it extends the Houdini API to define typed custom properties with defaults and inheritance, and demonstrates a series of practical animations—including gradient transitions, conic‑gradient pie charts, length‑based underline effects, and a full‑screen saver—by rewriting traditional CSS with @property definitions and showcasing the required code snippets.

CSSHoudinianimation
0 likes · 13 min read
Leveraging CSS @property (Houdini) for Advanced Animations and Custom Property Control
Python Programming Learning Circle
Python Programming Learning Circle
Apr 22, 2021 · Fundamentals

Advanced Class Methods and Special Member Functions in Python

This article explains Python's advanced class features—including static methods, class methods, property decorators, special dunder methods, reflection utilities, dynamic attribute manipulation, metaclass creation, and exception handling—illustrated with clear code examples and practical usage tips.

Exception HandlingPythonclass methods
0 likes · 14 min read
Advanced Class Methods and Special Member Functions in Python
Python Programming Learning Circle
Python Programming Learning Circle
Mar 22, 2021 · Fundamentals

Understanding Python @property Decorator: Advantages, Syntax, and Usage

This tutorial explains the benefits of using Python properties, introduces decorator functions, and provides step‑by‑step examples of defining @property getter, setter, and deleter methods to create clean, readable, and maintainable class interfaces.

OOPPythondecorator
0 likes · 11 min read
Understanding Python @property Decorator: Advantages, Syntax, and Usage
ByteFE
ByteFE
Mar 14, 2021 · Frontend Development

Exploring @property and Its Animating Powers

This article explains how the CSS @property rule lets developers define the syntax, initial value, and inheritance behavior of custom properties, enabling type‑checked animations and transitions that were previously impossible with plain string‑based CSS variables.

CSSanimationcustom properties
0 likes · 25 min read
Exploring @property and Its Animating Powers
ByteFE
ByteFE
Mar 11, 2021 · Frontend Development

Exploring CSS @property: Type Checking, Animations, and Creative Uses

This article introduces the CSS @property rule, explains how it enables type‑checking for custom properties, and demonstrates a variety of animation techniques—including color cycles, gradients, transforms, and numeric counters—to showcase the powerful new possibilities for modern front‑end development.

CSSanimationfrontend
0 likes · 11 min read
Exploring CSS @property: Type Checking, Animations, and Creative Uses
Test Development Learning Exchange
Test Development Learning Exchange
Aug 24, 2018 · Fundamentals

Using Python's property() to Create Managed Attributes

This article explains the purpose, syntax, parameters, and return value of Python's property() function, demonstrates how to define getter, setter, and deleter methods both directly and via decorators, and provides additional examples and related built‑in attribute functions.

OOPPythonattributes
0 likes · 5 min read
Using Python's property() to Create Managed Attributes