Menu

Commit [r26519]  Maximize  Restore  History

Manual Python 3 fixes for the dict.key() function which returns a list or iterator in Python 2 or 3.

This involves a number of changes. The biggest is the conversion of the "x in y.keys()" statements
to "x in y". For code which requires a list of keys, the function calls "list(y.keys())" or
preferably "sorted(y.keys())" are used throughout (sorted() ensures that the list will be of the
same order on all operating systems and Python implementations). A number of "x in list(y.keys())"
statements were simplified to "x in y", some list() calls changed to sorted(), and some unnecessary
list() calls were removed.

bugman 2014-11-11

1 2 3 > >> (Page 1 of 3)
changed /trunk/data_store/__init__.py
changed /trunk/data_store/align_tensor.py
changed /trunk/data_store/data_classes.py
changed /trunk/data_store/diff_tensor.py
changed /trunk/data_store/pipe_container.py
changed /trunk/data_store/prototype.py
changed /trunk/extern/sobol/sobol_lib.py
changed /trunk/gui/analyses/__init__.py
changed /trunk/gui/components/relax_data.py
changed /trunk/gui/components/relax_data_meta.py
changed /trunk/gui/components/spectrum.py
changed /trunk/gui/export_bmrb.py
changed /trunk/gui/spin_viewer/tree.py
changed /trunk/gui/uf_objects.py
changed /trunk/lib/structure/internal/molecules.py
changed /trunk/lib/xml.py
changed /trunk/pipe_control/align_tensor.py
changed /trunk/pipe_control/bmrb.py
changed /trunk/pipe_control/error_analysis.py
changed /trunk/pipe_control/interatomic.py
changed /trunk/pipe_control/pcs.py
changed /trunk/pipe_control/pipes.py
changed /trunk/pipe_control/plotting.py
changed /trunk/pipe_control/rdc.py
changed /trunk/pipe_control/relax_data.py
/trunk/data_store/__init__.py Diff Switch to side-by-side view
Loading...
/trunk/data_store/align_tensor.py Diff Switch to side-by-side view
Loading...
/trunk/data_store/data_classes.py Diff Switch to side-by-side view
Loading...
/trunk/data_store/diff_tensor.py Diff Switch to side-by-side view
Loading...
/trunk/data_store/pipe_container.py Diff Switch to side-by-side view
Loading...
/trunk/data_store/prototype.py Diff Switch to side-by-side view
Loading...
/trunk/extern/sobol/sobol_lib.py Diff Switch to side-by-side view
Loading...
/trunk/gui/analyses/__init__.py Diff Switch to side-by-side view
Loading...
/trunk/gui/components/relax_data.py Diff Switch to side-by-side view
Loading...
/trunk/gui/components/relax_data_meta.py Diff Switch to side-by-side view
Loading...
/trunk/gui/components/spectrum.py Diff Switch to side-by-side view
Loading...
/trunk/gui/export_bmrb.py Diff Switch to side-by-side view
Loading...
/trunk/gui/spin_viewer/tree.py Diff Switch to side-by-side view
Loading...
/trunk/gui/uf_objects.py Diff Switch to side-by-side view
Loading...
/trunk/lib/structure/internal/molecules.py Diff Switch to side-by-side view
Loading...
/trunk/lib/xml.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/align_tensor.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/bmrb.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/error_analysis.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/interatomic.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/pcs.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/pipes.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/plotting.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/rdc.py Diff Switch to side-by-side view
Loading...
/trunk/pipe_control/relax_data.py Diff Switch to side-by-side view
Loading...
1 2 3 > >> (Page 1 of 3)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.