Sorry.  I didn't read carefully enough.  That's right -- the "if 
converter: break" was replaced with "return converter".

You're right.  This is fine.

Mike

John Hunter wrote:
> On Tue, Oct 7, 2008 at 11:26 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
>   
>> This isn't quite what I was suggesting (and seems to be equivalent to
>> the code as before).  In the common case where there are no units in the
>> data, this will still traverse the entire list.
>>
>> I think replacing the whole loop with:
>>
>>  converter = self.get_converter(iter(x).next())
>>
>> would be even better.  (Since lists of data should not be heterogeneous
>> anyway...)
>>     
>
> Hmm, I don't see how it would traverse the entire list
>
>             for thisx in x:
>                 converter = self.get_converter( thisx )
>                 return converter
>
> since it will return after the first element in the loop.  I have no
> problem with the iter approach, but am not seeing what the problem is
> with this usage.
>
> JDH
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


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

Reply via email to