From: A.M. K. <aku...@us...> - 2000-08-17 23:37:04
|
Update of /cvsroot/py-howto/pyhowto In directory slayer.i.sourceforge.net:/tmp/cvs-serv6146 Modified Files: python-2.0.tex Log Message: Mention the new 'import X as Y' syntax Index: python-2.0.tex =================================================================== RCS file: /cvsroot/py-howto/pyhowto/python-2.0.tex,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** python-2.0.tex 2000/08/17 00:27:06 1.23 --- python-2.0.tex 2000/08/17 23:37:01 1.24 *************** *** 608,611 **** --- 608,615 ---- 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 |