Wrap the given coordinate seqence in the given tag type. You pass in the _BEGIN tag, with the assumption that the _END tag is _BEGIN+1.
(coords: Iterable[Tuple[float]], begin_tag: PointTag)
| 103 | |
| 104 | |
| 105 | def wrap_bare(coords: Iterable[Tuple[float]], begin_tag: PointTag) -> TaggedPointSequence: |
| 106 | """Wrap the given coordinate seqence in the given tag type. |
| 107 | |
| 108 | You pass in the _BEGIN tag, with the assumption that the _END tag is _BEGIN+1. |
| 109 | """ |
| 110 | yield coords[0], (begin_tag,) |
| 111 | for point in coords[1:-1]: |
| 112 | yield point, () |
| 113 | yield coords[-1], (PointTag(begin_tag.value + 1),) |
| 114 | |
| 115 | |
| 116 | def wrap_tagged(points: TaggedPointSequence, begin_tag: PointTag) -> TaggedPointSequence: |
no test coverage detected