--- Lib/string.py~	2004-11-01 04:52:43.000000000 +0100
+++ Lib/string.py	2005-02-14 10:41:41.000000000 +0100
@@ -145,6 +145,12 @@
         raise ValueError('Invalid placeholder in string: line %d, col %d' %
                          (lineno, colno))
 
+    def partial_substitute(self, *args, **kwargs):
+        return Template( self.safe_substitute(*args, **kwargs) )
+
+    def partial_replace(self, *args, **kwargs):
+        self.template = self.safe_substitute(*args, **kwargs)
+
     def substitute(self, *args, **kws):
         if len(args) > 1:
             raise TypeError('Too many positional arguments')
