-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I had forgotten once again the exact parameters of cdms2.setAutoBounds and the help is still not showing much in cdms 3.2.5 (I remember an issue about help/docstrings, but can't find it)
>>> help(cdms2.setAutoBounds)
Help on function setAutoBounds in module cdms2.axis:
setAutoBounds(mode)
(END)
So I just thought I'd give a crappy argument to setAutoBounds and I would get an error message telling me what the allowed arguments are. Except that crappy arguments are just silently ignored! Printing an error message would be safer and more useful
>>> cdms2.setAutoBounds('crap')
>>> cdms2.getAutoBounds()
2
>>> cdms2.setAutoBounds(20)
>>> cdms2.getAutoBounds()
2
>>> cdms2.setAutoBounds('off')
>>> cdms2.getAutoBounds()
0
>>> cdms2.setAutoBounds(20)
>>> cdms2.getAutoBounds()
0
>>> cdms2.setAutoBounds(-3.14)
>>> cdms2.getAutoBounds()
0
I resorted to finding the setAutoBounds doc in readthedocs but I sometimes wonder if I'm the only person reading the documentation
BTW, the documentation says Note: In versions of CDMS prior to V4.0, the default mode was 'on' but nothing about the current default, which seems to be grid.
Metadata
Metadata
Assignees
Labels
No labels