Python logo

Table of Contents

  • 8. Compound statements
    • 8.1. The if statement
    • 8.2. The while statement
    • 8.3. The for statement
    • 8.4. The try statement
      • 8.4.1. except clause
      • 8.4.2. except* clause
      • 8.4.3. else clause
      • 8.4.4. finally clause
    • 8.5. The with statement
    • 8.6. The match statement
      • 8.6.1. Overview
      • 8.6.2. Guards
      • 8.6.3. Irrefutable Case Blocks
      • 8.6.4. Patterns
        • 8.6.4.1. OR Patterns
        • 8.6.4.2. AS Patterns
        • 8.6.4.3. Literal Patterns
        • 8.6.4.4. Capture Patterns
        • 8.6.4.5. Wildcard Patterns
        • 8.6.4.6. Value Patterns
        • 8.6.4.7. Group Patterns
        • 8.6.4.8. Sequence Patterns
        • 8.6.4.9. Mapping Patterns
        • 8.6.4.10. Class Patterns
    • 8.7. Function definitions
    • 8.8. Class definitions
    • 8.9. Coroutines
      • 8.9.1. Coroutine function definition
      • 8.9.2. The async for statement
      • 8.9.3. The async with statement
    • 8.10. Type parameter lists
      • 8.10.1. Generic functions
      • 8.10.2. Generic classes
      • 8.10.3. Generic type aliases
    • 8.11. Annotations

Previous topic

7. Simple statements

Next topic

9. Top-level components