How to implement incremental type checking during a Hackathon in just 3 days!

Python is a duck ๐Ÿฆ† typed language, meaning it doesnโ€™t verify types, it verifies the presence of methods and properties at runtime. For example, we can call my_method() on any object, and as long as the object has the method my_method, then the call will succeed.

This is both an advantage and a disadvantage:

  • ๐Ÿ‘ It is easy to add behavior to objects without defining new types
  • ๐Ÿ‘Ž It is hard to know in advance if a method call will succeed

Being duck typed implies that typeโ€ฆ

Alexandre DuBreuil

Software engineer at @avec_alan , sound designer, book author, conference speaker, and open source maintainer ๐Ÿ“• Music Generation with Magenta

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store