[Scipy-svn] r4922 - trunk/scipy/cluster

scipy-svn@scip... scipy-svn@scip...
Sun Nov 2 18:08:38 CST 2008


Author: jarrod.millman
Date: 2008-11-02 18:08:36 -0600 (Sun, 02 Nov 2008)
New Revision: 4922

Modified:
   trunk/scipy/cluster/hierarchy.py
Log:
use in for testing dictionary membership


Modified: trunk/scipy/cluster/hierarchy.py
===================================================================
--- trunk/scipy/cluster/hierarchy.py	2008-11-02 23:55:52 UTC (rev 4921)
+++ trunk/scipy/cluster/hierarchy.py	2008-11-03 00:08:36 UTC (rev 4922)
@@ -1600,7 +1600,7 @@
                 axis.add_collection(colors_to_collections[color])
         # If there is a blue grouping (i.e., links above the color threshold),
         # it should go last.
-        if colors_to_collections.has_key('b'):
+        if 'b' in colors_to_collections:
             axis.add_collection(colors_to_collections['b'])
 
         if contraction_marks is not None:



More information about the Scipy-svn mailing list