Getting to Know Python 3.7- Data Classes, Async-Await and More

Getting to Know Python 3.7- Data Classes, Async-Await and More

With Python 3.7, thanks to PEP-557, you now have access to a decorator called , that automatically adds an implicit function for you when you add typings to your class variables. Take the following as an example of what was required to make a function asynchronous prior to Python 3.7:

In previous versions of Python adding in a breakpoint to use the built-in Python debugger ( ) would require . When using async/await functions in the Python event loop prior to 3.7, context managers that used thread local variables had the chance to bleed values across executions, potentially creating bugs that are difficult to find.

Source: blog.heroku.com