<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><br></span></div><div><br></div>  <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">De:</span></b> Emiliano Gavilan &lt;emilianogavilan@gmail.com&gt;<br> <b><span style="font-weight: bold;">Para:</span></b> programacion@lugro.org.ar <br> <b><span style="font-weight: bold;">Enviado:</span></b> jueves, 20 de septiembre de 2012 8:28<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: [Programación]Paso por valor o referencia? En las funciones en Python<br> </font> </div> <br>El día 20 de septiembre de 2012 07:50, Horacio Castellini<br>&lt;<a ymailto="mailto:horacio9573@yahoo.com.ar"
 href="mailto:horacio9573@yahoo.com.ar">horacio9573@yahoo.com.ar</a>&gt; escribió:<br><br>&gt; Si un objeto int fuera inmutable como una tupla o un string,, donde el "="<br>&gt; crea otro objeto inmutable, y a cada copia debería estar asignada a areas de<br>&gt; memoria distinta, esto debería causar un memory overflow, por ejemplo en un<br>&gt; código como este...<br>&gt;<br>&gt; x=0<br>&gt; while True:<br>&gt;&nbsp; &nbsp;  x=x+3<br><br>No hay memory overflow porque, aunque el interprete crea un nuevo objeto<br>en cada iteración, el anterior es borrado ya que queda huérfano,<br>sin ninguna referencia.<br>Acá no estoy muy seguro, pero probablemente python use algun tipo de<br>reference counting en los objetos. Esto permite que se liberen rapidamente<br>y no como en java, en el cual el garbage collection suele aparecer en los<br>momentos menos oportunos haciendo que el proceso palme...</div><div style="color: rgb(0, 0, 0); font-size: 14px;
 font-family: Arial; background-color: transparent; font-style: normal; font-weight: bold; " class="yui_3_2_0_17_134818310721867"><br></div><div style="font-weight: bold; color: rgb(0, 0, 0); font-size: 15px; font-family: Arial; background-color: transparent; font-style: normal; " class="yui_3_2_0_17_134818310721867">----------------------------------</div><div style="font-weight: bold; color: rgb(0, 0, 0); font-size: 15px; font-family: Arial; background-color: transparent; font-style: normal; " class="yui_3_2_0_17_134818310721867"><br></div><div style="font-weight: bold; color: rgb(0, 0, 0); font-size: 15px; font-family: Arial; background-color: transparent; font-style: normal; " class="yui_3_2_0_17_134818310721867">vaya... cada día se aprende algo nuevo... gracias... nunca imaginé que fuera así...</div><div style="font-weight: bold; color: rgb(0, 0, 0); font-size: 15px; font-family: Arial; background-color: transparent; font-style: normal; "
 class="yui_3_2_0_17_134818310721867"><br></div><div style="font-weight: bold; color: rgb(0, 0, 0); font-size: 15px; font-family: Arial; background-color: transparent; font-style: normal; " class="yui_3_2_0_17_134818310721867"><br><br> </div> </div>  </div></body></html>