Numbering function: consecutive integers starting at arbitrary start.
(start: int)
| 216 | |
| 217 | |
| 218 | def count_from_n_factory(start: int) -> OrderingFunc[Any]: |
| 219 | """Numbering function: consecutive integers starting at arbitrary start.""" |
| 220 | |
| 221 | def f(index: int, collection: object) -> int: |
| 222 | return index + start |
| 223 | |
| 224 | try: |
| 225 | f.__name__ = "count_from_%i" % start |
| 226 | except TypeError: |
| 227 | pass |
| 228 | return f |
| 229 | |
| 230 | |
| 231 | def _unsugar_count_from(**kw: Any) -> Dict[str, Any]: |
no outgoing calls
no test coverage detected