diff makeitso/template.py @ 71:95d1bb85ab3c

add a copy method to a variable to get a non-futzed copy
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 Jan 2011 16:53:55 -0800
parents cb00c011ff45
children f44af8f30147
line wrap: on
line diff
--- a/makeitso/template.py	Fri Jan 07 16:31:28 2011 -0800
+++ b/makeitso/template.py	Fri Jan 07 16:53:55 2011 -0800
@@ -27,6 +27,10 @@
 
         self._set = False
 
+    def copy(self):
+        """returns a copy of the variable"""
+        return Variable(self.name, self.description, self.default, self.cast)
+
     def set(self, value):
         if self.cast:
             self.value = self.cast(value)