25

The difference in Python OOP between:

  • instance method
  • class method
  • static method

visually explained using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต:

you are viewing a single comment's thread
view the rest of the comments
[-] aion@lemmy.world 2 points 1 month ago

Just don't use double underscores in C++, identifiers containing double underscores are reserved for the compiler/linker/standard library.

[-] bterwijn@programming.dev 1 points 1 month ago

Same thing in Python, double underscore prefix triggers "name mangling". There are issues that can pop up when using it if not aware.

this post was submitted on 30 Jun 2026
25 points (96.3% liked)

Python

8017 readers
38 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 3 years ago
MODERATORS