Using `Sequence` frees users from the need to cast to `list` in cases where the underlying API does not really care about the type of the container. Note that accepting an `nb::sequence` is marginally slower than accepting `nb::list` directly, because `__getitem__`, `__len__` etc need to go through an extra layer of indirection. However, I expect the performance difference to be negligible.
22 KiB
22 KiB