Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.
(bx, item)
| 191 | |
| 192 | |
| 193 | def _parse_box_dots(bx, item): |
| 194 | """Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.""" |
| 195 | for idx, char in enumerate(item): |
| 196 | if char == "[": |
| 197 | return item[:idx], item[idx:] |
| 198 | elif char == ".": |
| 199 | return item[:idx], item[idx + 1 :] |
| 200 | raise BoxError("Could not split box dots properly") |
| 201 | |
| 202 | |
| 203 | def _get_dot_paths(bx, current=""): |