2013/1/4 Marco Beri <span dir="ltr"><<a href="mailto:marcoberi@gmail.com" target="_blank">marcoberi@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Chi indovina cosa stampa l'ultima riga di questo snippet senza eseguirlo? Si accettano tentativi :-)</div><div><br></div><div><font face="courier new, monospace">x = ([],)</font></div><div><font face="courier new, monospace">try:</font></div>
<div><font face="courier new, monospace"> x[0] += [3]</font></div><div><font face="courier new, monospace">except TypeError:</font></div><div><font face="courier new, monospace"> print "+= raised TypeError"</font></div>
<div><font face="courier new, monospace">print "x =", x</font></div><div><br></div></div></blockquote><div><br></div><div>Ci provo:</div><div><br></div><div><span style="font-family:'courier new',monospace">... stack trace di un IndexError</span></div>
<div><span style="font-family:'courier new',monospace">x =([],)</span></div><div><span style="font-family:'courier new',monospace"><br></span></div><div><font face="courier new, monospace">Ciao</font></div>
</div>-- <br>Andrea Francia <a href="http://andreafrancia.it" target="_blank">http://andreafrancia.it</a>