Commit 95386e5
committed
python: add convert_values member to ConstraintParser class
Problem: Values are always returned as strings by the ConstraintParser
parser, but there are times when another type may be more
suitable. Additionally, there is currently no way to reduce a set
of values to a single element if this is required or beneficial in
the result.
Add a convert_values mapping to the ConstraintParser class. If an
operator is in this dictionary, then the values of a term are passed
to the provided callable, which should return a new list of values
as a result.1 parent 8e9a03d commit 95386e5
1 file changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
| |||
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
287 | 301 | | |
288 | 302 | | |
289 | 303 | | |
| |||
408 | 422 | | |
409 | 423 | | |
410 | 424 | | |
| 425 | + | |
411 | 426 | | |
412 | | - | |
413 | | - | |
414 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
415 | 431 | | |
416 | 432 | | |
417 | 433 | | |
| |||
0 commit comments