Commits

Jonathan Eunice committed a1f65aa

Improved Options.copy()

Comments (0)

Files changed (2)

         for k in c.config:
             self[k] = c.config[k]
             
+    def copy(self):
+        """
+        Return a copy of this instance.
+        """
+        new = orderedstuf.copy(self)
+        new._magic = self._magic.copy()
+        return new
+            
         # UNDER CONSTRUCTION
             
         # use read, sections, itesms as in this note
     o1 = options.copy()
     assert o1 is not options
     assert o1 == options
+    
     o2 = options.push(dict(this=4, blik='rubber'))
     assert o2.nick == 'nack'
     assert o2.slick == 'slack'