From: Andrew M. Kuchling Date: Thu, 17 Aug 2000 23:37:01 +0000 (+0000) Subject: Mention the new 'import X as Y' syntax X-Git-Tag: v2.0b1~390 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59ecafa526ba504328a4a6f91659be55a2c163a0;p=thirdparty%2FPython%2Fcpython.git Mention the new 'import X as Y' syntax --- diff --git a/Doc/whatsnew/whatsnew20.tex b/Doc/whatsnew/whatsnew20.tex index b2fe85729c2c..3081d16c6da2 100644 --- a/Doc/whatsnew/whatsnew20.tex +++ b/Doc/whatsnew/whatsnew20.tex @@ -607,6 +607,10 @@ optional ``base'' parameter when the first argument is a string. 291. \code{int(123, 16)} raises a \exception{TypeError} exception with the message ``can't convert non-string with explicit base''. +Modules can now be renamed on importing them, using the syntax +\code{import \var{module} as \var{name}} or \code{from \var{module} +import \var{name} as \var{othername}}. + Previously there was no way to implement a class that overrode Python's built-in \keyword{in} operator and implemented a custom version. \code{\var{obj} in \var{seq}} returns true if \var{obj} is