Changes between Version 16 and Version 17 of DevNotes/DevGuide/CodingRules
- Timestamp:
- May 30, 2016 8:52:31 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevNotes/DevGuide/CodingRules
v16 v17 60 60 * Use _box_car with a leading underscore for non-public methods and _CamelCase with a leading underscore for non-public classes. 61 61 * Never use __box_car__ with leading and trailing double underscores 62 * Avoid one-letter variable names. 63 62 * Avoid one-letter variable names (unless is acceptable one letter variable name or it is justified by the math in the paper) 63 * Don't make long variable names just to keep lint happy: 64 {{{ 65 #!div style="font-size: 80%" 66 {{{#!python 67 [(value, key) for key, value in translation_dictionary.items()] 68 }}} 69 }}} 70 is no better than: 71 {{{ 72 #!div style="font-size: 80%" 73 {{{#!python 74 [(v, k) for k, v in translation_dictionary.items()] 75 }}} 76 }}} 77 but the following is: 78 {{{ 79 #!div style="font-size: 80%" 80 {{{#!python 81 [(latin, english) for english, latin in translation_dictionary.keys()] 82 }}} 83 }}} 64 84 * Models: for adding a new model no capitalization and thus no CamelCase in model names. If necessary use underscore to separate (i.e. barbell not BarBell or broad_peak not BroadPeak) 65 85 * Models: Don't add/Remove “model” in/from the name (i.e. barbell not BarBellModel)