Mercurial > hg > PaInt
diff paint/package.py @ 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 | ab0620d3755b |
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"""