Tutorial

Index

  1. Lesson 1 - Basic Typechecking - how to make sure your functions get the right parameters and return the right things.

  2. Lesson 2 - Built-in Types - learn about expressing complex types using Python's built-in datatypes.

  3. Lesson 3 - Utility Classes - explore typecheck's library of utilities that allow you to make complex, precise assertions about types.

  4. Lesson 4 - Typechecking Methods - all you ever wanted to know about adding typechecking to your instance-, class- and staticmethods.

  5. Lesson 5 - Generators - writing generators may be tricky, but typechecking them sure isn't.

  6. Lesson 6 - Typechecking Best Practices - tips, tricks and sage counsel from the typechecking trenches.

  7. Advanced Topics

    1. Type Variables - all about type variables, a concept borrowed from languages like Haskell.

    2. Doctest Support - learn how to make your typechecked code play nicely with the doctest module.

    3. Using Functions for Complex Typing - in addition to the built-in utility classes, you can pass functions and methods to the typechecking decorators, allowing powerful, custom typing behaviour. Learn how.

    4. Typechecking with assert_type - strategies for smarter, more surgical typechecking

Valid XHTML 1.0 Transitional