Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread Michael Droettboom
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 sugg

Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread John Hunter
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 t

Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread Michael Droettboom
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 b