This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Hi Yuan & Julien -- > > Related to the explicit testing for "null" in the Java code, we also > found that in a few places in 3 of the .py files (shell.py, grid.py > and maps.py) there are statements like: > > a = getSomething() > if (a == None) doSomething... > > The problem here, as related to the one you just fixed in Java, is > that if "a" is a class and has an "equals" or "__eq__" (or __ne__) > method, this will be called when the > "if (a == None") is done. The Jython code should be changed to > > if (a is None) doSomething... > > or > > if (a is not None) doSomething... > > This form does not result in the interpreter calling the Java method, > and so is "safe" in this situation (when testing against "None"). > > I have attached a zip file with updates to the 3 py files I mentioned > above. Hopefully, you will be able to have time to check these and > update the IDV resource/python/ files > accordingly. > > Thanks. > > tom Hi Tom, I checked in the changes, thanks for these updates. Yuan > > -- > Tom Whittaker > University of Wisconsin-Madison > Space Science & Engineering Center (SSEC) > Cooperative Institute for Meteorological Satellite Studies (CIMSS) > 1225 W. Dayton Street > Madison, WI 53706 USA > ph: +1 608 262 2759 > > Ticket Details =================== Ticket ID: HNT-802608 Department: Support IDV Priority: Normal Status: Closed