<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck" -->

---
title: Python 3.12 Preview: Static Typing Improvements Quiz –...
description: An interactive quiz tests understanding of Python 3.12's static typing improvements, including the new PEP 695 type variable syntax, differences between...
canonical: https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Python 3.12 Preview: Static Typing Improvements Quiz – Real Python | daily.dev
og:description: An interactive quiz tests understanding of Python 3.12's static typing improvements, including the new PEP 695 type variable syntax, differences between...
og:url: https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck
og:image: https://api.daily.dev/og/posts/g7YzuUTcK.png
og:image:alt: Python 3.12 Preview: Static Typing Improvements Quiz – Real Python
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.

# Python 3.12 Preview: Static Typing Improvements Quiz – Real Python

**[Real Python](https://daily.dev/sources/rpython)** · 2 min read · 0 upvotes · 0 comments

## Summary

An interactive quiz tests understanding of Python 3.12's static typing improvements, including the new PEP 695 type variable syntax, differences between constrained and bounded type variables, the type statement for type aliases, the @override decorator, and typed dictionaries for annotating **kwargs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://realpython.com/quizzes/python312-typing>

## Questions this post answers

### How do I declare type variables using the new PEP 695 syntax in Python 3.12?

Python 3.12 introduces a new syntax for declaring type variables directly in generic class, function, and type alias definitions via PEP 695, removing the need to import TypeVar separately in many cases. This makes generics simpler to define. Constrained and bounded type variables behave differently: constrained type variables restrict a type to one of a specific set of types, while bounded type variables restrict it to a type and its subtypes.

_Developers adopting Python 3.12 typing syntax can track related changes and tutorials on daily.dev._

### What does the @override decorator do in Python 3.12 typing?

The @override decorator lets developers explicitly mark a method as overriding a method in a parent class, helping model inheritance safely and catch refactoring mistakes when a base class method is renamed or removed. It works alongside typed dictionaries, which can annotate variable keyword arguments (**kwargs) precisely for stricter type checking.

_Teams refactoring class hierarchies in Python can follow typing updates like this on daily.dev._

## Similar posts on daily.dev

- [Typing improvements in Python 3.15](https://daily.dev/posts/typing-improvements-in-python-3-15-ogpllwucu) · Planet Python · 1 upvotes · 1 comments
- [Python 3.15 Preview: Upgraded JIT Compiler Quiz – Real Python](https://daily.dev/posts/python-3-15-preview-upgraded-jit-compiler-quiz-real-python-rq9dedraj) · Real Python · 0 upvotes · 0 comments
- [The Joy of Typing](https://daily.dev/posts/the-joy-of-typing-r5aiqx2dz) · Towards Data Science · 0 upvotes · 0 comments
- [Python 3.15 Preview: Lazy Imports Quiz – Real Python](https://daily.dev/posts/python-3-15-preview-lazy-imports-quiz-real-python-m6hk3ltll) · Real Python · 0 upvotes · 0 comments
- [Python Typing Survey 2025: Code Quality and Flexibility As Top Reasons for Typing Adoption](https://daily.dev/posts/python-typing-survey-2025-code-quality-and-flexibility-as-top-reasons-for-typing-adoption-6srpuoadf) · Facebook Engineering
 · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck)

```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":"Python 3.12 Preview: Static Typing Improvements Quiz – Real Python","url":"https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck"},"datePublished":"2026-08-25T12:13:13.934Z","dateModified":"2026-09-14T07:07:02.603Z","description":"An interactive quiz tests understanding of Python 3.12's static typing improvements, including the new PEP 695 type variable syntax, differences between...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b6b18168796c280d8713e07ba91dc286?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b6b18168796c280d8713e07ba91dc286?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Real 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":"Real Python","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rpython","url":"https://daily.dev/sources/rpython"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,python","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Real Python","item":"https://daily.dev/sources/rpython"},{"@type":"ListItem","position":3,"name":"Python 3.12 Preview: Static Typing Improvements Quiz – Real Python"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/python-3-12-preview-static-typing-improvements-quiz-real-python-g7yzuutck#faq","mainEntity":[{"@type":"Question","name":"How do I declare type variables using the new PEP 695 syntax in Python 3.12?","acceptedAnswer":{"@type":"Answer","text":"Python 3.12 introduces a new syntax for declaring type variables directly in generic class, function, and type alias definitions via PEP 695, removing the need to import TypeVar separately in many cases. This makes generics simpler to define. Constrained and bounded type variables behave differently: constrained type variables restrict a type to one of a specific set of types, while bounded type variables restrict it to a type and its subtypes. Developers adopting Python 3.12 typing syntax can track related changes and tutorials on daily.dev."}},{"@type":"Question","name":"What does the @override decorator do in Python 3.12 typing?","acceptedAnswer":{"@type":"Answer","text":"The @override decorator lets developers explicitly mark a method as overriding a method in a parent class, helping model inheritance safely and catch refactoring mistakes when a base class method is renamed or removed. It works alongside typed dictionaries, which can annotate variable keyword arguments (**kwargs) precisely for stricter type checking. Teams refactoring class hierarchies in Python can follow typing updates like this on daily.dev."}}]}
```

