Skip to content

Make get_nested_resource_ptr support a nested sequence of bytes #1354

Description

@leofang

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

Activity

  1. added this to the milestone on Dec 10, 2025
  2. added
    enhancementAny code-related improvements
    P1Medium priority - Should do
    cuda.bindingsEverything related to the cuda.bindings module
    on Dec 10, 2025
  3. modified the milestones: , cuda-python 13-next, 12-next temp on Jan 22, 2026
  4. self-assigned this
    on Feb 18, 2026
  5. rparolin commented on Feb 20, 2026

    @rparolin
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Medium priority - Should docuda.bindingsEverything related to the cuda.bindings moduleenhancementAny code-related improvements

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions