[Tutor] "local variable 'l1' referenced before assignment"

Dick Moores rdm at rcblue.com
Sat Jun 28 12:07:20 CEST 2008


At 02:22 AM 6/28/2008, Martin Walsh wrote:
>Douglas Drumond wrote:
> >
> > In a2() you do l1 += l2, ie, l1 = l1 + l2
>
>A subtle clarification is warranted I think. l1 += l2 is not the same as
>l1 = l1 + l2, when l1 and l2 are lists.

And wow, can the times for each differ from each other! See, for 
example, <http://py77.python.pastebin.com/f5b82bc23>

Dick 



More information about the Tutor mailing list