From 5f2573bb7bc0447ff57d3b8c8d22c23b2191d15b Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Thu, 23 Nov 2023 19:10:07 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- python_typing/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/python_typing/README.md b/python_typing/README.md index 5e08c859..ea9e857f 100644 --- a/python_typing/README.md +++ b/python_typing/README.md @@ -56,11 +56,25 @@ def this_is_a_function(a: int, b: int = 8) -> tuple[int, int]: return a, b ``` -Please note, that there is a difference how type annotations worked for older version. I will cover only Python 3.10 and newer. +Please note, that there is a difference how type annotations worked for older version. I will cover only Python 3.10 and newer. The official documentation can be found [here](https://docs.python.org/3/library/typing.html). ## MyPy under VS Code (also the header packages) +## Built-in types +### Simple types +### Any type (Special type indicating an unconstrained type.) + +```python +from typing import Any +a: Any = 0 +b: float = 0.0 +a = b +``` + +### Generic types + +