What's the best way to minimize the need of run time checks?

Juan Pablo Romero Méndez jpablo.romero at gmail.com
Tue Aug 9 14:29:58 EDT 2016


Hello,

In online forums sometimes people complain that they end up having to test
constantly for None, or that a function's argument has a specific type /
shape (which immediately brings the following aphorism to mind: "Any
sufficiently large test suite contains an ad hoc, bug-ridden, slow
implementation of half of Haskell's type system").

Some responses I've seen to that particular complaint is that they are
doing it wrong. That they are trying to force a type system into a dynamic
language (Clojure, Ruby, Python, Javascript, etc).

Do you guys have any resources you like that addresses the following issue:
What is the best way to use the dynamic features of Python to avoid having
to write a poor's man type system?


Thanks!

  Juan Pablo



More information about the Python-list mailing list