[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.117,1.118

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Tue, 22 Oct 2002 13:31:25 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv21488

Modified Files:
	libfuncs.tex 
Log Message:
Modify example to use string methods instead of the string module.


Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -d -r1.117 -r1.118
*** libfuncs.tex	24 Sep 2002 21:08:36 -0000	1.117
--- libfuncs.tex	22 Oct 2002 20:31:22 -0000	1.118
***************
*** 38,42 ****
    \var{name} is returned.  This is done for compatibility with the
    bytecode generated for the different kinds of import statement; when
!   using \samp{import spam.ham.eggs}, the top-level package \code{spam}
    must be placed in the importing namespace, but when using \samp{from
    spam.ham import eggs}, the \code{spam.ham} subpackage must be used
--- 38,42 ----
    \var{name} is returned.  This is done for compatibility with the
    bytecode generated for the different kinds of import statement; when
!   using \samp{import spam.ham.eggs}, the top-level package \module{spam}
    must be placed in the importing namespace, but when using \samp{from
    spam.ham import eggs}, the \code{spam.ham} subpackage must be used
***************
*** 46,54 ****
  
  \begin{verbatim}
- import string
- 
  def my_import(name):
      mod = __import__(name)
!     components = string.split(name, '.')
      for comp in components[1:]:
          mod = getattr(mod, comp)
--- 46,52 ----
  
  \begin{verbatim}
  def my_import(name):
      mod = __import__(name)
!     components = name.split('.')
      for comp in components[1:]:
          mod = getattr(mod, comp)