def __init__(self, *args): this = _pywrapknapsack_solver.new_KnapsackSolver(*args) try: self.this.append(this) except __builtin__.Exception: self.this = this