Solution to the 0-1 knapsack
When creating classes in Python 2, you need to have classes explicitly inherit from object, like this:

class MyClass(object):
    ...


If you're creating a class in Python 3, you don't need to explicitly inherit from object.



As the classic Stop Writing Classes puts it, one characteristic of a class that should be a function is if the class has only two methods, __init__, and another. This means that your Thieves class would become one method, like this:

def thieves(details, items):
    ...