(*args)
| 30 | |
| 31 | # zip with args length check |
| 32 | def safe_zip(*args): |
| 33 | args = list(map(list, args)) |
| 34 | n = len(args[0]) |
| 35 | for arg in args[1:]: |
| 36 | assert len(arg) == n, f"length mismatch: {list(map(len, args))}" |
| 37 | return list(zip(*args)) |
| 38 | |
| 39 | |
| 40 | # ((x, a), (y, b), (z, c)) -> (x, y, z), (a, b, c) |
no test coverage detected