Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

Python • Re: Class Variables, Access, and Persistence

$
0
0
Look for a tutorial on classes, e.g. https://www.w3schools.com/python/python_oop.asp

When accessing class 'MyClass" property "my_member ", use either
- self.my_member when my_member is owned by a class instance
- MyClass.my_member is a class property

- my_member without "self." or "MyClass." is a variable in a method.

Statistics: Posted by ghp — Sun Oct 26, 2025 8:33 pm



Viewing all articles
Browse latest Browse all 8609

Trending Articles