1. Better error tracking2. Structural pattern matching3. New type union operator4. Stricter zipping5. Automatic text encoding6. Asynchronous iteration
Better Error Tracking
In Python 3.10, this is all much easier with better error messages and precise line numbers for debugging.
Structural Pattern Matching
Python 3.10 is the addition of structural pattern matching otherwise known as the switch, case statement
New Type Union Operator
In previous versions, you could specify the type of an attribute. But, if you wanted to accept two types, then you would need to use the union keyword.
Stricter Zipping
Python 3.10 introduced a new parameter, strict was, to check if all iterable passed to the zip function are of the same length.
Automatic Text Encoding
In Python 3.10, a warning activates to inform the user when (or if) they open a text file without a specific encoding type.
Asynchronous Iteration
In Python 3.10, there are two new asynchronous built-in functions, aiter() and anext(), to make your code even more readable.