2 ms·
You need to be at the level where you understand the difference between import x and from x import. This comes after couple months of training. And if after t
by crabbone 3y ago
You need to be at the level where you understand the difference between import x and from x import. This comes after couple months of training. And if after that you accidentally mistype it -- well, you'll know where to look for a potential error. It is not a problem for anyone with significant Python experience.
> "unnecessary" forms
The from x import is unnecessary and so is import as. Both can be written like so:
import x.y
y = x.y # from
import x
y = x # as
So, they aren't necessary. You can write any program that uses them without them.
> PEP 562 already moved in the opposite direction, towards making them real objects
Who cares? We had dozens of nonsense PEPs, and will have hundreds more. Python isn't known for good planning nor for execution. I'm talking about what should've been done. The nonsense Python does is way over there when it comes to what it should be doing.