Python logo

Previous topic

Reasons to avoid static type checking

Next topic

Generics

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • Python logo
  • Python »
  • typing documentation »
  • Type System Reference
  • |
  • |

Type System ReferenceΒΆ

Contents:

  • Generics
    • Defining generic classes
    • Defining subclasses of generic classes
    • Generic functions
    • Generic methods and generic self
    • Automatic self types using typing.Self
    • Variance of generic types
    • Type variables with upper bounds
    • Type variables with constraints
    • Declaring decorators
    • Generic protocols
    • Generic type aliases
    • Generic class internals
    • Credits
  • Protocols and structural subtyping
    • Predefined protocols
    • Simple user-defined protocols
    • Defining subprotocols and subclassing protocols
    • Invariance of protocol attributes
    • Recursive protocols
    • Using isinstance() with protocols
    • Callback protocols
    • Predefined protocol reference
    • Credits
  • Type Stubs
    • Introduction
    • Syntax
    • Distribution
    • Supported Constructs
    • Type Stub Content
    • Style Guide
    • Copyright
  • Typing Best Practices
    • Introduction
    • Typing Features
    • Ergonomic Practices
    • Stylistic Practices
  • Testing and Ensuring Type Annotation Quality
    • Testing Annotation Accuracy
    • Improving Type Completeness
  • typing Module Documentation

Previous topic

Reasons to avoid static type checking

Next topic

Generics

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • Python logo
  • Python »
  • typing documentation »
  • Type System Reference
  • |
  • |
© Copyright 2021, The Python Typing Team.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.

The Python Software Foundation is a non-profit corporation. Please donate.


Created using Sphinx 7.2.6.