We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Practice
  • Certification
  • Compete
  • Career Fair
  • Hiring developers?
  1. Practice
  2. Tutorials
  3. 30 Days of Code
  4. Day 19: Interfaces
  5. Discussions

Day 19: Interfaces

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

    You are viewing a single comment's thread. Return to all comments →

  • jakehku 4 years ago+ 0 comments

    This is what i found on stackoverflow

    Because Python doesn't have (and doesn't need) a formal Interface contract, the Java-style distinction between abstraction and interface doesn't exist. If someone goes through the effort to define a formal interface, it will also be an abstract class. The only differences would be in the stated intent in the docstring.

    And the difference between abstract and interface is a hairsplitting thing when you have duck typing.

    Java uses interfaces because it doesn't have multiple inheritance.

    http://stackoverflow.com/questions/372042/difference-between-abstract-class-and-interface-in-python

    4|
    ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature