Tag

self

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Sep 13, 2024 · Backend Development

Understanding PHP Static Members: self::, parent::, and static::

This article explains PHP static members, how self::, parent::, and static:: differ in inheritance contexts, when to use static members, and provides clear code examples illustrating their distinct behaviors for method and property access.

OOPPHPinheritance
0 likes · 7 min read
Understanding PHP Static Members: self::, parent::, and static::
Python Programming Learning Circle
Python Programming Learning Circle
Mar 17, 2022 · Fundamentals

Understanding the self Parameter in Python Classes

This article explains the purpose of the self parameter in Python classes, using analogies and concrete code examples to show how self represents the instance itself, how it is passed automatically, and how different objects produce distinct self values when methods are invoked.

OOPPythonTutorial
0 likes · 5 min read
Understanding the self Parameter in Python Classes
Python Programming Learning Circle
Python Programming Learning Circle
May 13, 2020 · Fundamentals

Why Explicit self Must Remain in Python

Bruce Eckel suggested removing the explicit 'self' parameter from Python class methods, but this article explains why keeping 'self' is essential for clear instance referencing, error messages, method types, decorators, and language compatibility, arguing that the proposal would introduce ambiguity and break existing conventions.

Language DesignOOPPython
0 likes · 8 min read
Why Explicit self Must Remain in Python