This is useful for metrics such as number of times a given pass performed
a transformation, etc.
Details
Details
- Reviewers
 fhahn MatzeB aemerson - Commits
 - rT866848a9c6f6: utils/compare.py: Add --absolute-diff
 
Diff Detail
Diff Detail
- Repository
 - rT test-suite
 
Event Timeline
Comment Actions
LGTM
| utils/compare.py | ||
|---|---|---|
| 294–295 | Should this have a default=False? (I guess currently you get None which works but feels a bit accidental)  | |
| utils/compare.py | ||
|---|---|---|
| 294–295 | Good question, I just checked and it turns out the store_true action sets the default to False: >>> import argparse
>>> parser = argparse.ArgumentParser(prog='compare.py')
>>> parser.add_argument('--absolute-diff', action='store_true', help='Use an absolute instead of a relative difference')
_StoreTrueAction(option_strings=['--absolute-diff'], dest='absolute_diff', nargs=0, const=True, default=False, type=None, choices=None, help='Use an absolute instead of a relative difference', metavar=None)
>>> parser.parse_args()
Namespace(absolute_diff=False) | |
Should this have a default=False? (I guess currently you get None which works but feels a bit accidental)