A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2001-February/015655.html below:

[Python-checkins] CVS: python/dist/src/Lib regsub.py,1.10,1.11

[Python-checkins] CVS: python/dist/src/Lib regsub.py,1.10,1.11Eric S. Raymond esr@users.sourceforge.net
Fri, 09 Feb 2001 01:19:29 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv28731

Modified Files:
	regsub.py 
Log Message:
String method conversion.


Index: regsub.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/regsub.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** regsub.py	2001/01/15 01:18:21	1.10
--- regsub.py	2001/02/09 09:19:27	1.11
***************
*** 108,116 ****
  
  def capwords(str, pat='[^a-zA-Z0-9_]+'):
-     import string
      words = splitx(str, pat)
      for i in range(0, len(words), 2):
!         words[i] = string.capitalize(words[i])
!     return string.joinfields(words, "")
  
  
--- 108,115 ----
  
  def capwords(str, pat='[^a-zA-Z0-9_]+'):
      words = splitx(str, pat)
      for i in range(0, len(words), 2):
!         words[i] = words[i].capitalize()
!     return "".joinfields(words)
  
  




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4