var Turtle1 var Turtle2 var Is_Turtle

    • _stranger_@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      9 months ago

      I’m only commenting because the actual python is practically pseudo code:

      
      # A turtle class
      class Turtle:
          shell=True
      
      # A boss class
      class Boss:
          authority=True
      
      #A class that inherits from another
      class TigerTurtle(Turtle):
          fuzzy=True
      
      # Multiple inheritance, or "The Devil's Playground"
      class TigerBossTurtle(TigerTurtle, Boss):
          #  shell, authority, and fuzzy are all true
          ...