Commit cc555cf
committed
Rework using try...except
The previous implementation introduced a behavior change: a field with
truncated data was always kept, while it had been filtered by passed
`field_id`.
Go back to use the try...except to adhere the original behavior as the
original `_Extra.split()`. Also add a test to explicitly check for
such case.
Benchmark shows this implementation improves performance.1 parent a693084 commit cc555cf
2 files changed
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5884 | 5884 | | |
5885 | 5885 | | |
5886 | 5886 | | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
| 5894 | + | |
| 5895 | + | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
| 5899 | + | |
| 5900 | + | |
5887 | 5901 | | |
5888 | 5902 | | |
5889 | 5903 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
2725 | 2726 | | |
2726 | 2727 | | |
2727 | 2728 | | |
2728 | 2729 | | |
2729 | | - | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | 2730 | | |
2734 | 2731 | | |
2735 | 2732 | | |
| |||
0 commit comments