mirror of
https://github.com/python/cpython
synced 2026-09-29 10:30:29 +03:00
Mention the new 'import X as Y' syntax
This commit is contained in:
parent
0690c86a2a
commit
59ecafa526
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue