def get_slot_values(slotted_instance):
    """Get all slot values in a class with slots."""
    # thanks: https://stackoverflow.com/a/6720815/782170
    return [getattr(slotted_instance, slot) for slot in slotted_instance.__slots__]