Alter list items within loop

Duncan Booth duncan.booth at invalid.invalid
Thu Jun 11 16:45:18 EDT 2009


Tim Harig <usernet at ilthio.net> wrote:

>> number 3 never gets printed. Does Python make a copy of a list before
>> it iterates through it?:
> 
> No, complex types are passed by reference unless explicity copied. 

*All* types are passed by reference unless explicitly copied. Python does 
make special cases for simple and complex types.



More information about the Python-list mailing list