Revision: 7834
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7834&view=rev
Author:   mdboom
Date:     2009-09-30 13:26:36 +0000 (Wed, 30 Sep 2009)

Log Message:
-----------
Fix Grouper docstring -- it only supports weak-referenceable objects.

Modified Paths:
--------------
    branches/v0_99_maint/lib/matplotlib/cbook.py

Modified: branches/v0_99_maint/lib/matplotlib/cbook.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/cbook.py        2009-09-28 22:12:38 UTC 
(rev 7833)
+++ branches/v0_99_maint/lib/matplotlib/cbook.py        2009-09-30 13:26:36 UTC 
(rev 7834)
@@ -1062,21 +1062,28 @@
     using :meth:`joined`, and all disjoint sets can be retreived by
     using the object as an iterator.
 
-    The objects being joined must be hashable.
+    The objects being joined must be hashable and weak-referenceable.
 
     For example:
 
-    >>> g = grouper.Grouper()
-    >>> g.join('a', 'b')
-    >>> g.join('b', 'c')
-    >>> g.join('d', 'e')
+    >>> class Foo:
+    ...     def __init__(self, s):
+    ...             self.s = s
+    ...     def __repr__(self):
+    ...             return self.s
+    ...
+    >>> a, b, c, d, e, f = [Foo(x) for x in 'abcdef']
+    >>> g = Grouper()
+    >>> g.join(a, b)
+    >>> g.join(b, c)
+    >>> g.join(d, e)
     >>> list(g)
-    [['a', 'b', 'c'], ['d', 'e']]
-    >>> g.joined('a', 'b')
+    [[d, e], [a, b, c]]
+    >>> g.joined(a, b)
     True
-    >>> g.joined('a', 'c')
+    >>> g.joined(a, c)
     True
-    >>> g.joined('a', 'd')
+    >>> g.joined(a, d)
     False
     """
     def __init__(self, init=[]):


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to