Python recursive attributes test