{
  "schema_version": "1.0",
  "codex": "thecodex.expert/coding",
  "type": "language-reference",
  "slug": "languages/python",
  "name": "Python",
  "section": "Languages",
  "canonical_definition": "Python is a general-purpose, high-level, interpreted, dynamically typed, multi-paradigm programming language designed for readability, with significant whitespace as block delimiters, a comprehensive standard library, and an extensive ecosystem centred on data science, machine learning, and automation.",
  "confidence": "high",
  "last_verified": "2026-06-01",
  "url": "https://thecodex.expert/coding/languages/python/",
  "current_version": "3.13",
  "version_release_date": "October 2024",
  "created": "1991",
  "creator": "Guido van Rossum",
  "typing": "dynamic (optional static type hints via PEP 484)",
  "execution": "interpreted (CPython VM)",
  "memory_management": "reference counting + cyclic garbage collector",
  "paradigms": [
    "procedural",
    "object-oriented",
    "functional"
  ],
  "primary_use_cases": [
    "data science",
    "machine learning",
    "automation",
    "web backends",
    "scripting",
    "education"
  ],
  "key_packages": {
    "numerical": [
      "numpy",
      "scipy"
    ],
    "data": [
      "pandas",
      "polars"
    ],
    "ml": [
      "scikit-learn",
      "pytorch",
      "tensorflow"
    ],
    "web": [
      "fastapi",
      "django",
      "flask"
    ],
    "tooling": [
      "pytest",
      "black",
      "mypy",
      "ruff",
      "uv"
    ]
  },
  "notable_peps": {
    "PEP 8": "Style guide",
    "PEP 20": "The Zen of Python",
    "PEP 484": "Type hints",
    "PEP 572": "Walrus operator",
    "PEP 634": "Structural pattern matching",
    "PEP 703": "Free-threaded CPython (GIL optional, 3.13)"
  },
  "version_milestones": {
    "3.5": "type hints, async/await",
    "3.6": "f-strings, dict ordered",
    "3.7": "dataclasses, dict order guaranteed",
    "3.8": "walrus operator :=",
    "3.10": "match/case pattern matching",
    "3.11": "10-60% speed improvement",
    "3.13": "free-threaded mode (GIL optional)"
  },
  "sources": [
    {
      "num": 1,
      "citation": "Python Software Foundation. The Python Language Reference. docs.python.org/3/reference/.",
      "tier": 1
    },
    {
      "num": 2,
      "citation": "Python Software Foundation. The Python Standard Library. docs.python.org/3/library/.",
      "tier": 1
    },
    {
      "num": 3,
      "citation": "PEP 8 \u2014 Style Guide for Python Code. peps.python.org/pep-0008/.",
      "tier": 1
    },
    {
      "num": 4,
      "citation": "PEP 20 \u2014 The Zen of Python. peps.python.org/pep-0020/.",
      "tier": 1
    },
    {
      "num": 5,
      "citation": "PEP 484 \u2014 Type Hints. peps.python.org/pep-0484/.",
      "tier": 1
    },
    {
      "num": 6,
      "citation": "PEP 703 \u2014 Making the GIL Optional. peps.python.org/pep-0703/.",
      "tier": 1
    }
  ]
}