Michael Droettboom wrote:
> Jeff Whitaker wrote:
>> John Hunter wrote:
>>> On Dec 3, 2007 2:08 PM, Jeff Whitaker <[EMAIL PROTECTED]> wrote:
>>>
>>>  
>>>> try:
>>>>     l,b,w,h = ax.get_position()
>>>> except:
>>>>     l,b,w,h = (ax.get_position()).bounds
>>>>     
>>>
>>> In general, blanket excepts are bad practice because they can mask
>>> other bugs.  You might catch the AttributeError, or do something like:
>>>
>>> pos = ax.get_position()
>>> l, b, w, h = getattr(pos, 'bounds', pos)
>>>
>>> or maybe a version or other check to see if you are on the branch
>>>
>>> JDH
>>>   
>> John: You're right, I should do that.  This is only in the examples, 
>> not in the basemap code itself though.
>
> Just out of curiosity -- were there significant changes to the basemap 
> code itself?

No, none.  I did uncover one bug though!

-Jeff


-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to