From: Adam T. <a-t...@st...> - 2006-10-10 01:26:55
|
> 2) I would tend to go for the more 'right' solution, which you say > is B. This seems also to be the simpler solution (in terms of > logic, not necessarily implementation). However, since you are > likely to be doing the implementation you may want to reconsider. > In either case, since as you say the fix is a bit convoluted, it's > probably best to create a function where you pass in a label, and > it returns something or other. This will also make it easier to > doctest (see normalisesym()). To run the doctests, you just need to > run "python adfparser.py". Done. Well mostly. When creating the symlist dictionary, it checks if it can be degenerate. If so, passes the label and repeat number to normalisedegenerates(). If label is P or D, look up in dictionary {'P': {0:"P:x", 1:"P:y",...}, 'D': {0:"D:z2", 1:"D:x2-y2"...}}. Otherwise, return label + number. The doctest string may need work because I just altered what I found easy, and deleted the rest. ;o) This means that regression.py now has only one error, which we decided was ok because it prints an acceptable error message. Should we consider removing it from the regression because of this? I'm not sure what the one failure in the gaussian parser is due to, but I'll look into it in the coming days. > P.S. The gmail/SF issue appears to be resolved. Glad to hear. Adam |