Quiz Catalog

Catalog of quizzes

class Point:
  def __init__( self, x=0, y=0):
    self.x = x
    self.y = y
  def __del__(self):
    class_name = self.__class__.__name__
    print (class_name, "destroyed")

class Pixel(Point):
  def __init__( self):
    super().__init__()

b = Pixel()
Point destroyed Pixel destroyed
  • class/method/del