Copilot picked up one thing that is interesting.
|
if ResT is char: |
|
obj_i_bytes = (<str?>(obj_i)).encode() |
Here, this block handles a nested sequence and the expectation is that the inner objects
obj_i are strings. But, in such cases it makes sense to also accept bytes, something like
obj_i_type = type(obj_i)
if obj_i_type is str:
obj_i_bytes = obj_i.encode()
else:
assert obj_i_type is bytes
obj_i_bytes = obj_i
Copilot picked up one thing that is interesting.
cuda-python/cuda_bindings/cuda/bindings/_internal/utils.pyx
Lines 100 to 101 in 4886636
Here, this block handles a nested sequence and the expectation is that the inner objects
obj_iare strings. But, in such cases it makes sense to also accept bytes, something like