Iterate over values, failing if any are less than zero.
(values, errmsg='negative value')
| 349 | |
| 350 | |
| 351 | def _fail_neg(values, errmsg='negative value'): |
| 352 | """Iterate over values, failing if any are less than zero.""" |
| 353 | for x in values: |
| 354 | if x < 0: |
| 355 | raise StatisticsError(errmsg) |
| 356 | yield x |
| 357 | |
| 358 | |
| 359 | def _integer_sqrt_of_frac_rto(n: int, m: int) -> int: |
no test coverage detected