Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-11-23 19:10:07 +01:00 committed by GitHub
parent c67be1599e
commit 5f2573bb7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,11 +56,25 @@ def this_is_a_function(a: int, b: int = 8) -> tuple[int, int]:
return a, b 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 ## MyPy under VS Code
(also the header packages) (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