Python 3.7, the latest version of the language aimed at making complex tasks simple, has officially entered its beta release phase. The final version of Python 3.7 is due in June 2018, but from this point onward no new features will be added to the Python 3.7 release.
The most significant additions and improvements to Python 3.7 include:
- Data classes that reduce boilerplate when working with data in classes.
- A potentially backward-incompatible change involving the handling of exceptions in generators.
- A “development mode” for the interpreter.
- Nanosecond-resolution time objects.
- UTF-8 mode that uses UTF-8 encoding by default in the environment.
- A new built-in for triggering the debugger.
Python data classes
Python is known far and wide as a fast and convenient way to manipulate structured data. Python provides classes to structure data and attach common behaviors to instances of that data, but classes with many initializers have long suffered from needing a lot of boilerplate code to instantiate them. For example: