Mercurial > hg > PaInt
comparison 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 |
comparison
equal
deleted
inserted
replaced
71:da69d58f960d | 72:017b75cd61d8 |
---|---|
262 """ | 262 """ |
263 a group of packages | 263 a group of packages |
264 """ | 264 """ |
265 | 265 |
266 def __init__(self, *packages): | 266 def __init__(self, *packages): |
267 self.packages = [] | |
267 for package in packages: | 268 for package in packages: |
268 # if Package instance, add that, otherwise convert | 269 self.add(package) |
269 pass | |
270 raise NotImplementedError | 270 raise NotImplementedError |
271 | |
272 def add(self, package): | |
273 """ | |
274 add a package to the instance. | |
275 If Package instance, add that, otherwise convert | |
276 """ | |
277 | |
278 __iadd__ = add | |
271 | 279 |
272 def dependencies(self): | 280 def dependencies(self): |
273 """return dependecies for each package""" | 281 """return dependecies for each package""" |
274 | 282 |
275 def unroll_dependencies(self): | 283 def unroll_dependencies(self): |