changeset 72:017b75cd61d8

dont hardcode adding in __init__; thats just stupid
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 27 Jan 2013 18:01:04 -0800
parents da69d58f960d
children 5b10f2c03cb9
files paint/package.py
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/paint/package.py	Sun Jan 27 17:57:38 2013 -0800
+++ b/paint/package.py	Sun Jan 27 18:01:04 2013 -0800
@@ -264,11 +264,19 @@
     """
 
     def __init__(self, *packages):
+        self.packages = []
         for package in packages:
-            # if Package instance, add that, otherwise convert
-            pass
+            self.add(package)
         raise NotImplementedError
 
+    def add(self, package):
+        """
+        add a package to the instance.
+        If Package instance, add that, otherwise convert
+        """
+
+    __iadd__ = add
+
     def dependencies(self):
         """return dependecies for each package"""