Basics

  • __init__ can be inherited
  • if a class doesn’t have an __init__ constructor, Python will check its parent class, as soon as it finds one, Python calls it and stops looking
  • we can use the super() function to call method in the parents class, or we may want to initialize in the parent class

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。