1. 程式人生 > >The No Title® Tech Blog

The No Title® Tech Blog

While Python 3.6.6 is a mainly a maintenance release, Python 3.7 brings some new features that you may be interested on.

Here are some highlights:

  • Python 3.7 is faster! As always it depends of your code, but for me, I am getting about 50% faster times in my Optimize Images application, just by switching from Python 3.6 to Python 3.7, which is an insanely cool improvement. In other applications, though, the performance improvements are not so drastic. For instance, I got a [virtually null] improvement of 1 to 2 % in

    Count Files, in case you were curious about it).

  • Data classes - a simpler way to define classes to store data, requiring less boilerplate code.

  • Dictionaries are now ordered. It used to be a CPython implementation detail in 3.6, but in Python 3.7 it’s now considered an official part of the Python language specification.

  • Built-in breakpoint() function, to make debugging easier.

  • async and await are now reserved keywords, and the asyncio module has some usability and performance improvements.

  • Nanosecond precision timers in the time module.

  • On its versions for macOS (both 3.7 and 3.6.5+), in case you haven’t noticed, Python is now being bundled with Tcl/Tk interpreter for tkinter

    . So, not only you don’t need to install it manually from a third-party, but you also get access to a newer version that may have some new improvements. It includes a new themed ttk.Spinbox widget) and it should now finally support PNG images.