changes made to obspyIO.py and focalmechplotter.py for string equiva…#5
changes made to obspyIO.py and focalmechplotter.py for string equiva…#5iceseismic wants to merge 3 commits intomarkcwill:masterfrom
Conversation
|
Feels like this might stem from obspy using |
There was a problem hiding this comment.
Just cosmetics, but those brackets ain't necessary..
There was a problem hiding this comment.
Yeah, I was in Fortran mode when I did that 👎
There was a problem hiding this comment.
@megies is correct. use == to compare strings, never is.
is is a much stricter and here unwanted comparison.
|
For the case of comparing literals (int, string, etc) w/ variable value bindings, I'm not 100% sure what the difference is in the compiler (object id vs value equiv), but @megies is right, we are after value equiv, and if those strings ever get abstracted out as variables, this would break. Which is probably what
Anyhoo, thanks! Either pull this into dev, or I'm waiting until I merge dev into master.... |
Hi Mark, For some reason in order to get my hashpy to work I had to change the string equivalence checks inside obspyIO.py and focalmechplotter.py ; from "is" to "==" in 3 or 4 places. I'm running under python2.7 myself