[yt-svn] commit/yt: MatthewTurk: Swap mutable in function declaration for a None and check inside the function.
Bitbucket
commits-noreply at bitbucket.org
Mon Sep 17 18:15:21 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/9497ec69bfce/
changeset: 9497ec69bfce
branch: yt
user: MatthewTurk
date: 2012-09-18 03:15:14
summary: Swap mutable in function declaration for a None and check inside the function.
affected #: 1 file
diff -r 2a6872ca2489c0e8cd38fd5fecc9738b03fefc52 -r 9497ec69bfce39c1289edee1a9c226389afe166c yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -809,7 +809,7 @@
raise RuntimeError("Colormap '%s' does not exist!" % str(cmap))
self.plots[field].image.set_cmap(cmap)
- def save(self,name=None,mpl_kwargs={}):
+ def save(self, name=None, mpl_kwargs=None):
"""saves the plot to disk.
Parameters
@@ -827,6 +827,7 @@
name = str(self.pf)
elif name.endswith('.png'):
return v.save(name)
+ if mpl_kwargs is None: mpl_kwargs = {}
axis = axis_names[self.data_source.axis]
weight = None
if 'Slice' in self.data_source.__class__.__name__:
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list