Revision: 4288
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4288&view=rev
Author:   jdh2358
Date:     2007-11-14 11:11:54 -0800 (Wed, 14 Nov 2007)

Log Message:
-----------
fixed is_string_like and removed is_file_like

Modified Paths:
--------------
    trunk/matplotlib/API_CHANGES
    trunk/matplotlib/lib/matplotlib/__init__.py
    trunk/matplotlib/lib/matplotlib/cbook.py

Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES        2007-11-14 19:06:52 UTC (rev 4287)
+++ trunk/matplotlib/API_CHANGES        2007-11-14 19:11:54 UTC (rev 4288)
@@ -1,4 +1,5 @@
-
+    removed cbook.is_file_like, which appears to be broken and unused.
+ 
     Added ax kwarg to pyplot.colorbar and Figure.colorbar so that
     one can specify the axes object from which space for the colorbar
     is to be taken, if one does not want to make the colorbar axes

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2007-11-14 19:06:52 UTC (rev 
4287)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2007-11-14 19:11:54 UTC (rev 
4288)
@@ -118,6 +118,7 @@
 
 
 def is_string_like(obj):
+    if hasattr(obj, 'shape'): return 0
     try: obj + ''
     except (TypeError, ValueError): return 0
     return 1

Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py    2007-11-14 19:06:52 UTC (rev 
4287)
+++ trunk/matplotlib/lib/matplotlib/cbook.py    2007-11-14 19:11:54 UTC (rev 
4288)
@@ -208,16 +208,11 @@
 
 
 def is_string_like(obj):
+    if hasattr(obj, 'shape'): return 0
     try: obj + ''
     except (TypeError, ValueError): return 0
     return 1
 
-
-def is_file_like(obj):
-    try: obj + ''
-    except (TypeError, ValueError): return 0
-    return 1
-
 def is_scalar(obj):
     return is_string_like(obj) or not iterable(obj)
 


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to