Python 3.7
Python 3.7 was released in June 2018, received bug fixes until June 2020, and will receive security patches until June 2023.
Built-in breakpoint
The new built-in breakpoint()
function allows you to quickly drop into a debugger by just writing it anywhere in your code. Rather than having to call the common idiom of import pdb;pdb.set_trace()
, in this version of Python, you can just use the built-in breakpoint()
, which not only works with the default Python debugger (pdb
) but any other debugger that you might use.
Module dynamic attributes
Python is an object-oriented programming language. Everything is an object in Python, and with PEP 562, modules can behave more like classes! With the addition of the work done by PEP 562, you can now add a __getattr__
function to your module that allows you to dynamically evaluate the querying of an attribute.
This is useful when you need to deprecate an attribute of your module, if you need to perform some catching, or if...