I have a class that only contains attributes and I would like packing/unpacking to work on it. What collections.abc
should I implement to get this behaviour?
class Item(object):
def __init__(self, name, age, gender)
self.name = name
self.age = age
self.gender = gender
a, b, c = Item("Henry", 90, "male")
I would like to avoid using a namedtuple
.