Parodia
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
  • bterwijn@programming.dev
  • 1 post
  • 3 comments
Joined 10 months ago
Cake day: August 30th, 2025
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
  • bterwijn@programming.devtoPython@programming.dev•Difference between 'instance', 'class', and 'static' method visually explained
    2 days

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

    • bterwijn@programming.devtoPython@programming.dev•Difference between 'instance', 'class', and 'static' method visually explained
      3 days

      Another common naming convention in C++ is using an underscore as prefix for member variables: int _memberVariable{123};

      Python@programming.devbybterwijn@programming.dev
      3 days

      Difference between 'instance', 'class', and 'static' method visually explained

      English

      The difference in Python OOP between:

      • instance method
      • class method
      • static method

      visually explained using 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵:

      5
        • bterwijn@programming.devtoPython@programming.dev•List comprehensions vs generator expressions
          3 days

          I like to use this example with my students: https://github.com/bterwijn/memory_graph#lazy-evaluation

          • BE: 1.0.0-beta.0
          • Modlog
          • Legal
          • Instances
          • Docs
          • Code
          • join-lemmy.org