On 26 April 2018 at 14:29, Julian DeMille via Python-ideas <python-ideas@python.org> wrote: > I personally would like a feature where instead of doing `from ... import > ...` (which imports the specified items into the current namespace), one > could use something along the lines of `import <lib>.{ <mod1>, <mod2>, ... > }` such that the imported modules/attributes could be accessed as > `<lib>.<mod1>`, etc.
What are the benefits of this over a simple "import <lib>"? I get that it will mean that *only* the names listed will be accessible as <lib>.<mod>, but I don't see why that's important (and specifically why it's important enough to warrant dedicated syntax). Hiding names in a namespace isn't typically something that Python provides language support for. Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/