(self, iterable: Iterable | None = None, box_class: type[box.Box] = box.Box, **box_options)
| 54 | return obj |
| 55 | |
| 56 | def __init__(self, iterable: Iterable | None = None, box_class: type[box.Box] = box.Box, **box_options): |
| 57 | self.box_options = box_options |
| 58 | self.box_options["box_class"] = box_class |
| 59 | self.box_org_ref = iterable |
| 60 | # 2026-10-10: Iteration does not require a truth value. |
| 61 | if iterable is not None: |
| 62 | for x in iterable: |
| 63 | list.append(self, self._convert(x)) |
| 64 | if isinstance(iterable, BoxList) and iterable is not self: |
| 65 | iterable._comment_copy_to(self) |
| 66 | self.box_org_ref = None |
| 67 | |
| 68 | def __getitem__(self, item, _ignore_default=False): |
| 69 | if self.box_options.get("box_dots") and isinstance(item, str) and item.startswith("["): |
no test coverage detected