[Python-ideas] Unpacking a dict

Pavol Lisy pavol.lisy at gmail.com
Sun May 29 13:10:33 EDT 2016


I see backward compatibility problem with import :

sys = dict(version_info=4.0)
from sys import version_info

This is legal and using import for unpacking dict could change this behavior.

In case we put higher priority to import from module then unexpected
module in PYTHONPATH could change unpacked value. Sort of problem not
easy to found. From library maintainer point of view not easy to avoid
too.


More information about the Python-ideas mailing list