[Python-checkins] python/dist/src/Lib textwrap.py,1.20,1.21
gward@users.sourceforge.net
gward@users.sourceforge.net
Wed, 11 Dec 2002 05:54:23 -0800
- Previous message: [Python-checkins] python/dist/src/Include dictobject.h,2.25,2.26
- Next message: [Python-checkins] python/dist/src/Include compile.h,2.38,2.39 parsetok.h,2.19,2.20 pyerrors.h,2.63,2.64 pythonrun.h,2.55,2.56 symtable.h,2.10,2.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12102
Modified Files:
textwrap.py
Log Message:
Tweak generation of unicode_whitespace_trans -- clearer, more
efficient. Suggested by MAL.
Index: textwrap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** textwrap.py 9 Dec 2002 16:26:05 -0000 1.20
--- textwrap.py 11 Dec 2002 13:54:20 -0000 1.21
***************
*** 53,58 ****
unicode_whitespace_trans = {}
! for c in string.whitespace:
! unicode_whitespace_trans[ord(unicode(c))] = ord(u' ')
# This funky little regex is just the trick for splitting
--- 53,59 ----
unicode_whitespace_trans = {}
! uspace = ord(u' ')
! for x in map(ord, string.whitespace):
! unicode_whitespace_trans[x] = uspace
# This funky little regex is just the trick for splitting
- Previous message: [Python-checkins] python/dist/src/Include dictobject.h,2.25,2.26
- Next message: [Python-checkins] python/dist/src/Include compile.h,2.38,2.39 parsetok.h,2.19,2.20 pyerrors.h,2.63,2.64 pythonrun.h,2.55,2.56 symtable.h,2.10,2.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]