Duck typing

The idea is that you don't need a type in order to invoke an existing method on an object - if a method is defined on it, you can invoke it

  • Duck Typing refers to the principle of not constraining or binding the code to specific data types.
  • We don’t care about the type of object, but we care about the methods and attributes the object include.
SuperMade with Super