On 16/01/21 10:14 am, Michael F. Stemper wrote:
I had no idea that syntax existed, and find it completely at odds with The Zen of Python.
It's not an *obvious* way, so there's no Zen conflict. As for why it exists, it's part of the mechanism that implements imports -- 'import' statements get compiled into a call to __import__. It also provides a way of importing something specifed by a string at runtime, so it can be useful. -- Greg -- https://mail.python.org/mailman/listinfo/python-list