Revision: 8344
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8344&view=rev
Author:   efiring
Date:     2010-05-30 18:48:35 +0000 (Sun, 30 May 2010)

Log Message:
-----------
pyplot.findobj: use docstring decorator. Closes 2994238.  Thanks to Mark Roddy.

Modified Paths:
--------------
    trunk/matplotlib/examples/tests/backend_driver.py
    trunk/matplotlib/lib/matplotlib/pyplot.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py   2010-05-30 18:35:42 UTC 
(rev 8343)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2010-05-30 18:48:35 UTC 
(rev 8344)
@@ -387,7 +387,7 @@
     return failures
 
 def parse_options():
-    doc = __doc__.split('\n\n')
+    doc = (__doc__ and __doc__.split('\n\n')) or "  "
     op = OptionParser(description=doc[0].strip(),
                       usage='%prog [options] [--] [backends and switches]',
                       #epilog='\n'.join(doc[1:])  # epilog not supported on my 
python2.4 machine: JDH

Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py   2010-05-30 18:35:42 UTC (rev 
8343)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py   2010-05-30 18:48:35 UTC (rev 
8344)
@@ -78,12 +78,11 @@
 from matplotlib.backends import pylab_setup
 new_figure_manager, draw_if_interactive, show = pylab_setup()
 
-
+...@docstring.copy_dedent(Artist.findobj)
 def findobj(o=None, match=None):
     if o is None:
         o = gcf()
     return o.findobj(match)
-findobj.__doc__ = Artist.findobj.__doc__
 
 def switch_backend(newbackend):
     """


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

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to