How to keep attr set in a loop in python
<p>How can I keep the attribute I set in a loop out of it ?</p>

<p>There is my code and I'll explain my problem next :</p>

<pre><code>students = Student.find_students()

if students:
    for student in students:
        student.address=""
        address = PersonAddress.find_address_by_person(student.person)
        student.address=address
        pprint (vars(student))        

    pprint (vars(students))
</code></pre>

<p>when I print the value of <code>student</code> the address is correctly show (and the right address, that's not the problem) but when the code print the value of the global var <code>students</code> there is no more address.</p>

<p>What I have to do to keep it ?</p>