Skip to content

Comment on Mypy - An experimental Python variant with dynamic and static typing

Comments

What about "hints"?

  def foo( often int n ):
This one would generate both the dynamic & the static versions.

Once all call sites stop using the dynamic version, one can move on to strict typing (and remove the "often" qualifier), if such is the goal.

Think of it like the old "register" hint in C code (now obsolete).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.