• TerrorBite :veripawed3:
      link
      fedilink
      61 year ago

      Python has had syntax support for type annotations for a while now. The Python runtime doesn’t enforce the typing at all, but it can be enforced by a linter or by your IDE. And I believe you can introspect the type annotations at runtime, because they are actually part of the syntax.

      There’s even an alternative way of doing type annotations through specially formatted comments, just in case you might still need to write code that is backwards compatible with Python 2.

      @escapesamsara @navi @programming