I just realize there is an ambiguity in PEP 484 regarding the ‘import ... as ...‘ syntax (and the other form).
I’ve always interpreted (and intended) this to mean ‘[from ...] import X as X’ (i.e. a redundant ‘as’ clause) and that is how it’s used in typeshed.
But it seems you are interpreting it as anything that uses an ‘as’ clause (as in Brett’s ‘dabuiltins’ example). And the text can indeed be read that way.
Do we have an indication that others are interpreting it that way? If not, maybe we should amend PEP 484 to clarify this.
—Guido
--
--Guido (mobile)