Revision: 6345
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6345&view=rev
Author: mdboom
Date: 2008-10-29 13:51:47 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
[204515] References to __doc__ break with -OO and in py2exe
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/scale.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-10-29 03:36:27 UTC (rev
6344)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-10-29 13:51:47 UTC (rev
6345)
@@ -5392,7 +5392,7 @@
def barbs(self, *args, **kw):
"""
- %s
+ %(barbs_doc)s
**Example:**
.. plot:: mpl_examples/pylab_examples/barb_demo.py
@@ -5403,7 +5403,8 @@
self.update_datalim(b.get_offsets())
self.autoscale_view()
return b
- barbs.__doc__ = cbook.dedent(barbs.__doc__) % mquiver.Barbs.barbs_doc
+ barbs.__doc__ = cbook.dedent(barbs.__doc__) % {
+ 'barbs_doc': mquiver.Barbs.barbs_doc}
def fill(self, *args, **kwargs):
"""
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2008-10-29 03:36:27 UTC (rev
6344)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2008-10-29 13:51:47 UTC (rev
6345)
@@ -563,7 +563,7 @@
sets the projection type of the axes. (For backward
compatibility, ``polar=True`` may also be provided, which is
equivalent to ``projection='polar'``). Valid values for
- *projection* are: %s. Some of these projections support
+ *projection* are: %(list)s. Some of these projections support
additional kwargs, which may be provided to :meth:`add_axes`::
rect = l,b,w,h
@@ -589,7 +589,7 @@
The following kwargs are supported:
- %s
+ %(Axes)s
"""
key = self._make_key(*args, **kwargs)
@@ -623,8 +623,9 @@
self._seen[key] = a
return a
- add_axes.__doc__ = add_axes.__doc__ % (", ".join(get_projection_names()),
'%(Axes)s')
- add_axes.__doc__ = dedent(add_axes.__doc__) % artist.kwdocd
+ add_axes.__doc__ = dedent(add_axes.__doc__) % \
+ {'list': (", ".join(get_projection_names())),
+ 'Axes': artist.kwdocd['Axes']}
def add_subplot(self, *args, **kwargs):
"""
@@ -640,7 +641,7 @@
*projection*, which chooses a projection type for the axes.
(For backward compatibility, *polar=True* may also be
provided, which is equivalent to *projection='polar'*). Valid
- values for *projection* are: %s. Some of these projections
+ values for *projection* are: %(list)s. Some of these projections
support additional *kwargs*, which may be provided to
:meth:`add_axes`.
@@ -651,7 +652,8 @@
return it.
The following kwargs are supported:
- %s
+
+ %(Axes)s
"""
key = self._make_key(*args, **kwargs)
@@ -685,8 +687,9 @@
self.sca(a)
self._seen[key] = a
return a
- add_subplot.__doc__ = dedent(add_subplot.__doc__) % (
- ", ".join(get_projection_names()), "%(Axes)s") % artist.kwdocd
+ add_subplot.__doc__ = dedent(add_subplot.__doc__) % {
+ 'list': ", ".join(get_projection_names()),
+ 'Axes': artist.kwdocd['Axes']}
def clf(self):
"""
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 03:36:27 UTC (rev
6344)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-10-29 13:51:47 UTC (rev
6345)
@@ -1634,7 +1634,7 @@
kwdoc["AvailableBoxstyles"]=" | ".join([l \
for l in _list_available_boxstyles(_fancy_bbox_transmuters)])
kwdoc.update(artist.kwdocd)
- set_boxstyle.__doc__ = set_boxstyle.__doc__ % kwdoc
+ set_boxstyle.__doc__ = cbook.dedent(set_boxstyle.__doc__) % kwdoc
del kwdoc
def set_mutation_scale(self, scale):
Modified: trunk/matplotlib/lib/matplotlib/scale.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/scale.py 2008-10-29 03:36:27 UTC (rev
6344)
+++ trunk/matplotlib/lib/matplotlib/scale.py 2008-10-29 13:51:47 UTC (rev
6345)
@@ -401,7 +401,7 @@
"""
Return a scale class by name.
- ACCEPTS: [ %s ]
+ ACCEPTS: [ %(names)s ]
"""
scale = scale.lower()
if scale is None:
@@ -411,7 +411,8 @@
raise ValueError("Unknown scale type '%s'" % scale)
return _scale_mapping[scale](axis, **kwargs)
-scale_factory.__doc__ = scale_factory.__doc__ % " | ".join(get_scale_names())
+scale_factory.__doc__ = dedent(scale_factory.__doc__) % \
+ {'names': " | ".join(get_scale_names())}
def register_scale(scale_class):
"""
@@ -431,7 +432,8 @@
docs.append(" '%s'" % name)
docs.append("")
class_docs = dedent(scale_class.__init__.__doc__)
- class_docs = "".join([" %s\n" % x for x in
class_docs.split("\n")])
+ class_docs = "".join([" %s\n" %
+ x for x in class_docs.split("\n")])
docs.append(class_docs)
docs.append("")
return "\n".join(docs)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins