<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu" -->

---
title: Typing improvements in Python 3.15 | daily.dev
description: Python 3.15 adds several typing module improvements. TypedDict gains extra_items and closed class parameters to control extra dictionary keys and their types....
canonical: https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Typing improvements in Python 3.15 | daily.dev
og:description: Python 3.15 adds several typing module improvements. TypedDict gains extra_items and closed class parameters to control extra dictionary keys and their types....
og:url: https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu
og:image: https://api.daily.dev/og/posts/OGPllWUCU.png
og:image:alt: Typing improvements in Python 3.15
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Typing improvements in Python 3.15

**[Planet Python](https://daily.dev/sources/planetpython)** · 6 min read · 0 upvotes · 1 comments

## Summary

Python 3.15 adds several typing module improvements. TypedDict gains extra_items and closed class parameters to control extra dictionary keys and their types. TypeVarTuple now accepts the same keyword arguments as TypeVar, including a new bound parameter whose meaning isn't yet specified. A new disjoint_base decorator marks classes, like typeshed's str and int, that can't be inherited from simultaneously. Type checkers can use it to flag conflicts. The new TypeForm special form lets code refer to type values directly, useful for functions like generic converters. Runtime checkable protocols are not inherited, and using a non-decorated subclass in isinstance checks is deprecated starting in 3.15 and will raise TypeError starting in Python 3.20.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mathspp.com/blog/typing-improvements-in-python-315>

## Questions this post answers

### How do I allow extra unknown keys in a Python TypedDict with a specific value type?

Use the extra_items class parameter in Python 3.15, for example class Movie(TypedDict, extra_items=str) lets a Movie dict include any extra keys as long as their values are strings. Use closed=True instead to disallow extra items entirely, regardless of type.

_daily.dev surfaces practical typing changes like this as you adopt new Python TypedDict features._

### What does the new typing.disjoint_base decorator do in Python 3.15?

It marks classes that cannot be simultaneously inherited from, like typeshed's str and int, so type checkers can detect layout conflicts directly from type information instead of heuristics. For example, decorating two classes A and B with disjoint_base lets a type checker flag class C(A, B) as invalid, though at runtime the decorator does not actually prevent the inheritance.

_developers tightening type checker accuracy can track additions like disjoint_base on daily.dev._

### Why is my Python Protocol subclass no longer allowed in an isinstance check?

Runtime checkability from @runtime_checkable is not inherited, so a subclass of a runtime checkable protocol must itself be decorated with runtime_checkable to work in isinstance or issubclass checks. Starting in Python 3.15, using an undecorated subclass this way is deprecated, and starting in Python 3.20 it will raise TypeError.

_teams planning upgrades can watch for breaking changes like this ahead of time on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@nark3d** · 0 upvotes

> A bound parameter on TypeVarTuple whose meaning isn't specified feels half-finished to me.  Better to ship the variance arguments now and add bound when there's a rule for what it constrains.
>
>
> https://prickles.org/tenet/type-guards/T3

## Similar posts on daily.dev

- [TypedDict with extra items](https://daily.dev/posts/typeddict-with-extra-items-y15hcfxfy) · Planet Python · 0 upvotes · 0 comments
- [Python 3.12 Preview: Static Typing Improvements Quiz – Real Python](https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck) · Real Python · 0 upvotes · 0 comments
- [DX improvements in Python 3.15](https://daily.dev/posts/dx-improvements-in-python-3-15-sq7j4fjy9) · Planet Python · 0 upvotes · 0 comments
- [Exciting Python features are on the way](https://daily.dev/posts/exciting-python-features-are-on-the-way-u7lhkabec) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Typing improvements in Python 3.15","url":"https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu"},"datePublished":"2026-10-27T16:50:42.953Z","dateModified":"2026-10-27T16:52:50.240Z","description":"Python 3.15 adds several typing module improvements. TypedDict gains extra_items and closed class parameters to control extra dictionary keys and their types....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/18eb0eb6878087610d5d3466f16a8382?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/18eb0eb6878087610d5d3466f16a8382?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Python","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Python","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/eac3cc584cb043b5a242d13752bd3d0c","url":"https://daily.dev/sources/planetpython"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"python","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Python","item":"https://daily.dev/sources/planetpython"},{"@type":"ListItem","position":3,"name":"Typing improvements in Python 3.15"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu","comment":[{"@type":"Comment","text":"A bound parameter on TypeVarTuple whose meaning isn’t specified feels half-finished to me.  Better to ship the variance arguments now and add bound when there’s a rule for what it constrains.\nhttps://prickles.org/tenet/type-guards/T3","datePublished":"2026-10-31T11:28:49.866Z","url":"https://daily.dev/posts/OGPllWUCU#c-dfu6xXfrd","author":{"@type":"Person","name":"Adam","url":"https://daily.dev/nark3d","image":"https://avatars.githubusercontent.com/u/2162621?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu#faq","mainEntity":[{"@type":"Question","name":"How do I allow extra unknown keys in a Python TypedDict with a specific value type?","acceptedAnswer":{"@type":"Answer","text":"Use the extra_items class parameter in Python 3.15, for example class Movie(TypedDict, extra_items=str) lets a Movie dict include any extra keys as long as their values are strings. Use closed=True instead to disallow extra items entirely, regardless of type. daily.dev surfaces practical typing changes like this as you adopt new Python TypedDict features."}},{"@type":"Question","name":"What does the new typing.disjoint_base decorator do in Python 3.15?","acceptedAnswer":{"@type":"Answer","text":"It marks classes that cannot be simultaneously inherited from, like typeshed's str and int, so type checkers can detect layout conflicts directly from type information instead of heuristics. For example, decorating two classes A and B with disjoint_base lets a type checker flag class C(A, B) as invalid, though at runtime the decorator does not actually prevent the inheritance. developers tightening type checker accuracy can track additions like disjoint_base on daily.dev."}},{"@type":"Question","name":"Why is my Python Protocol subclass no longer allowed in an isinstance check?","acceptedAnswer":{"@type":"Answer","text":"Runtime checkability from @runtime_checkable is not inherited, so a subclass of a runtime checkable protocol must itself be decorated with runtime_checkable to work in isinstance or issubclass checks. Starting in Python 3.15, using an undecorated subclass this way is deprecated, and starting in Python 3.20 it will raise TypeError. teams planning upgrades can watch for breaking changes like this ahead of time on daily.dev."}}]}
```

