One function
findall in r1chardj0n3s/parse
The author described this change as “Fix findall case_sensitive (#113)”. It counts as a record because the check below fails on the code as it stood at 27db6b349 and passes on 19689cf5b, with nothing else changed between the two runs.
Projectr1chardj0n3s/parse
Fix saved2020-07-30
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Search "string" for all occurrences of "format". You will be returned an iterator that holds Result instances for each format match found. Optionally start the search at "pos" character index and limit the search to a maximum index of endpos - equivalent to search(string[:endpos]). If `evaluate_result` is True each returned Result instance has two attributes: .fixed - tuple of fixed-position values from the string .named - dict of named values from the string If `evaluate_result` is False each returned value is a Match instance with one method: .evaluate_result() - This will return a Result instance like you would get with `evaluate_result` set to True The default behaviour is to match strings case insensitively. You may match with case by specifying case_sensitive=True. If the format is invalid a ValueError will be raised. See the module documentation for the use of "extra_types".
The change
| 26 | 26 | See the module documentation for the use of "extra_types". | |
| 27 | 27 | ''' | |
| 28 | 28 | p = Parser(format, extra_types=extra_types, case_sensitive=case_sensitive) | |
| 29 | - | return Parser(format, extra_types=extra_types).findall(string, pos, endpos, evaluate_result=evaluate_result) | |
| 29 | + | return p.findall(string, pos, endpos, evaluate_result=evaluate_result) |
The check that tells the two apart
fail→pass·test_parse.py::TestFindall::test_case_sensitivity
Check file test_parse.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it27db6b3498aeee80aa87c083dda76f2df2d87fa4
Broken version dated2020-07-26
Moduleparse
Units changedfindall
Fingerprintf9e179ff365b6d10
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in r1chardj0n3s/parse
- 2021-06-04Fix handling of unused alignment (#132)
- 2019-12-23Handle fortran formatted float number, Bug fix & test case.
- 2013-10-15date_convert
- 2012-09-29fix type conversion error with dotted names