Author: Armin Rigo <[email protected]>
Branch: extradoc
Changeset: r199:97f33446e1b0
Date: 2011-06-03 16:33 +0200
http://bitbucket.org/pypy/pypy.org/changeset/97f33446e1b0/

Log:    Clarify.

diff --git a/compat.html b/compat.html
--- a/compat.html
+++ b/compat.html
@@ -92,7 +92,9 @@
 they just enable and disable the execution of finalizers.  Also,
 <tt class="docutils literal">gc.garbage</tt> always returns an empty list.</p>
 </li>
-<li><p class="first">You can't attach a <tt class="docutils 
literal">__del__</tt> method to a class after its creation.</p>
+<li><p class="first">You can't add a <tt class="docutils literal">__del__</tt> 
method to an existing class; it
+must be present in the class since the beginning, or else it
+will not be automatically called when instances are freed.</p>
 </li>
 <li><p class="first">You can't store non-string keys in type objects. 
Example</p>
 <div class="syntax python"><pre><span class="k">class</span> <span 
class="nc">A</span><span class="p">(</span><span class="nb">object</span><span 
class="p">):</span><br/>    <span class="nb">locals</span><span 
class="p">()[</span><span class="mi">42</span><span class="p">]</span> <span 
class="o">=</span> <span class="mi">3</span><br/></pre></div>
diff --git a/source/compat.txt b/source/compat.txt
--- a/source/compat.txt
+++ b/source/compat.txt
@@ -71,7 +71,9 @@
   they just enable and disable the execution of finalizers.  Also,
   ``gc.garbage`` always returns an empty list.
 
-* You can't attach a ``__del__`` method to a class after its creation.
+* You can't add a ``__del__`` method to an existing class; it
+  must be present in the class since the beginning, or else it
+  will not be automatically called when instances are freed.
 
 * You can't store non-string keys in type objects. Example
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to