On 25 April 2018 at 06:23, Mike Miller
Now, I agree that's not a difference of much consequence, but the difference from "import as" is not either.
Since this example has been brought up by a few folks now, I'll note that "import x.y.z as c" has never been entirely equivalent to a simple assignment, since it *also* avoids the default binding of "x" in the current namespace. These days, it's diverged even further, since we added a fallback to looking for the full "x.y.z" key in sys.modules if any part of the submodule lookup chain gets an AttributeError. The proposed name binding expressions aren't like that - they really are just an ordinary binding of the result of the given expression to the given name. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia