[Python-checkins] python/nondist/sandbox/string alt292.py, 1.4, 1.5 curry292.py, 1.3, 1.4 mod292.py, 1.1, 1.2

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Tue Sep 7 21:14:45 CEST 2004


Update of /cvsroot/python/python/nondist/sandbox/string
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28009

Modified Files:
	alt292.py curry292.py mod292.py 
Log Message:
tqs fiddling for emacs happification


Index: alt292.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/string/alt292.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- alt292.py	7 Sep 2004 05:15:57 -0000	1.4
+++ alt292.py	7 Sep 2004 19:14:42 -0000	1.5
@@ -1,4 +1,4 @@
-r''' Doctests for PEP 292's string template functions
+r"""Doctests for PEP 292's string template functions
 
 First, it is now a function and accepts either mappings or keyword arguments:
 
@@ -33,10 +33,10 @@
 The ValueErrors are now more specific.  They include the line number and the
 mismatched token:
 
->>> t = """line one
+>>> t = '''line one
 ... line two
 ... the $@malformed token
-... line four"""
+... line four'''
 >>> simplesub(t, {})
 Traceback (most recent call last):
  . . .
@@ -68,7 +68,7 @@
  . . .
 ValueError: Invalid placeholder on line 1:  '@malformed'
 
-'''
+"""
 
 
 

Index: curry292.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/string/curry292.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- curry292.py	7 Sep 2004 04:41:54 -0000	1.3
+++ curry292.py	7 Sep 2004 19:14:43 -0000	1.4
@@ -1,4 +1,4 @@
-r''' Doctests for PEP 292's string template functions
+r"""Doctests for PEP 292's string template functions
 
 First, it is now a function and accepts either mappings or keyword arguments:
 
@@ -33,10 +33,10 @@
 The ValueErrors are now more specific.  They include the line number and the
 mismatched token:
 
->>> t = """line one
+>>> t = '''line one
 ... line two
 ... the $@malformed token
-... line four"""
+... line four'''
 >>> Template(t)({})
 Traceback (most recent call last):
  . . .
@@ -68,7 +68,7 @@
  . . .
 ValueError: Invalid placeholder on line 1:  '@malformed'
 
-'''
+"""
 
 
 
@@ -134,9 +134,10 @@
     def __call__(self, mapping=None, **kwds):
         """A function for $-substitutions.
 
-        This function is 'safe' in the sense that you will never get KeyErrors if
-        there are placeholders missing from the interpolation dictionary.  In that
-        case, you will get the original placeholder in the value string.
+        This function is 'safe' in the sense that you will never get KeyErrors
+        if there are placeholders missing from the interpolation dictionary.
+        In that case, you will get the original placeholder in the value
+        string.
         """
         if mapping is None:
             mapping = kwds

Index: mod292.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/string/mod292.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mod292.py	7 Sep 2004 05:22:16 -0000	1.1
+++ mod292.py	7 Sep 2004 19:14:43 -0000	1.2
@@ -1,4 +1,4 @@
-r''' Doctests for PEP 292's string template functions
+r"""Doctests for PEP 292's string template functions
 
 Now, it makes sure the return type is a str if all the inputs are a str. Any
 unicode components will cause a unicode output.  This matches the behavior of
@@ -25,10 +25,10 @@
 The ValueErrors are now more specific.  They include the line number and the
 mismatched token:
 
->>> t = """line one
+>>> t = '''line one
 ... line two
 ... the $@malformed token
-... line four"""
+... line four'''
 >>> Template(t) % dict()
 Traceback (most recent call last):
  . . .
@@ -60,7 +60,7 @@
  . . .
 ValueError: Invalid placeholder on line 1:  '@malformed'
 
-'''
+"""
 
 
 
@@ -124,9 +124,10 @@
     def __mod__(self, mapping):
         """A function for $-substitutions.
 
-        This function is 'safe' in the sense that you will never get KeyErrors if
-        there are placeholders missing from the interpolation dictionary.  In that
-        case, you will get the original placeholder in the value string.
+        This function is 'safe' in the sense that you will never get KeyErrors
+        if there are placeholders missing from the interpolation dictionary.
+        In that case, you will get the original placeholder in the value
+        string.
         """
         template = self.tstring
         def convert(mo):



More information about the Python-checkins mailing list