Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59ecafa

Browse files
committed
Mention the new 'import X as Y' syntax
1 parent 0690c86 commit 59ecafa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/whatsnew/whatsnew20.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,10 @@ \section{Core Changes}
607607
291. \code{int(123, 16)} raises a \exception{TypeError} exception
608608
with the message ``can't convert non-string with explicit base''.
609609
610+
Modules can now be renamed on importing them, using the syntax
611+
\code{import \var{module} as \var{name}} or \code{from \var{module}
612+
import \var{name} as \var{othername}}.
613+
610614
Previously there was no way to implement a class that overrode
611615
Python's built-in \keyword{in} operator and implemented a custom
612616
version. \code{\var{obj} in \var{seq}} returns true if \var{obj} is

0 commit comments

Comments
 (0)