step_demo is failing because of this:

In [4]:xx = numpy.ma.ones((2,3))

In [5]:xx + ''
Out[5]:array(NotImplemented)


which makes cbook.is_string_like(xx) return True.  This is a pitfall of 
duck-typing--sometimes something that quacks like duck is not a duck at all.

I can get back to this later, but maybe someone else can quickly think 
of a better non-hackish duck-typing test to use in is_string_like.

Or, maybe there are places where we need to be using
isinstance(x, (str, unicode))
instead.  Are there really cases where we need to detect something that 
is not a subclass of str or unicode, but that we can and should still 
treat as a string?

At the same time, I notice that cbook.is_file_like is identical to 
is_string_like.  This seems worse than useless to me.  If we are going 
to have "is_file_like" then it should do something like check for read 
and write methods.

Eric

-------------------------------------------------------------------------
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to