Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 602 Bytes

File metadata and controls

6 lines (4 loc) · 602 Bytes

Duck typing

TODO: ADD MORE

  • Python is also a good example of "Duck typing," to wit, "if it walks like a duck, talks like a duck, it's a duck.". This is accomplished partly with "magic" or "dunder" methods (double-under) that provide various interfaces to an object. If an object implements __iter__ and __next__, it can be iterated through; it doesn't matter what type the object actually is. hamming
  • the exercise supports any argument that supports modular division and comparison to integers (ie int, float, Decimal) leap