mypy
c840a3bb - [mypyc] Add vec extend function to librt.vecs (#21340)

Commit
58 days ago
[mypyc] Add vec extend function to librt.vecs (#21340) This is similar to the `append` function, but the second parameter is an iterable instead of a single item. This is fairly straightforward, but we need multiple implementations for the different vec representations. We also have separate functions for `extend` with two vec arguments, and for `extend` with any iterable as the second argument. Also support the `extend(v, v)` special case. We can later add optimized support for the buffer protocol (e.g. extend `vec[u8]` with a `bytes` object).
Author
Parents
Loading