Message196434
| Author |
paul.j3 |
| Recipients |
bethard, chris.jerdonek, gfxmonk, martin.panter, paul.j3, tshepang, waltermundt |
| Date |
2013年08月28日.23:14:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1377731640.23.0.845238561528.issue15112@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
These three changes end up testing for the same thing. The initial 'if' catches different test cases. 'subparsers' or 'remainder' might 'confuse' the 'O' test. The zero-width test ends up weeding out everything but the test cases added for this issue.
# if we haven't hit the end of the command line strings,
if start_index + sum(arg_counts) != len(arg_strings_pattern):
while arg_counts and arg_counts[-1] == 0:
arg_counts.pop()
# same test using selected_pattern (= arg_strings_pattern[start_index:])
if len(selected_pattern) != sum(arg_counts):
while arg_counts and arg_counts[-1] == 0:
arg_counts.pop()
# alt test: test for optional in the remaining pattern
if 'O' in selected_pattern:
while arg_counts and arg_counts[-1] == 0:
arg_counts.pop() |
|