Author: Armin Rigo <[email protected]>
Branch: ec-keepalive
Changeset: r81550:52bed60ea80d
Date: 2016-01-04 17:25 +0100
http://bitbucket.org/pypy/pypy/changeset/52bed60ea80d/

Log:    Document and cross-reference these two modules, which implement
        somewhat similar but subtly different semantics.

diff --git a/rpython/rlib/rshrinklist.py b/rpython/rlib/rshrinklist.py
--- a/rpython/rlib/rshrinklist.py
+++ b/rpython/rlib/rshrinklist.py
@@ -6,6 +6,8 @@
     The twist is that occasionally append() will throw away the
     items for which must_keep() returns False.  (It does so without
     changing the order.)
+
+    See also rpython.rlib.rweaklist.
     """
     _mixin_ = True
 
diff --git a/rpython/rlib/rweaklist.py b/rpython/rlib/rweaklist.py
--- a/rpython/rlib/rweaklist.py
+++ b/rpython/rlib/rweaklist.py
@@ -5,6 +5,13 @@
 
 
 class RWeakListMixin(object):
+    """A mixin base class.  A collection that weakly maps indexes to objects.
+    After an object goes away, its index is marked free and will be reused
+    by some following add_handle() call.  So add_handle() might not append
+    the object at the end of the list, but can put it anywhere.
+
+    See also rpython.rlib.rshrinklist.
+    """
     _mixin_ = True
 
     def initialize(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to