Skip to content

Allow memoryview objects to support ctypes Arrays #112014

Description

@rianhunter

Feature or enhancement

Proposal:

Currently this fails:

import ctypes

ArrayType = (ctypes.c_ubyte * 10)

a = ArrayType()
b = memoryview(a)
b[0] = 1 # this throws an exception but it doesn't have to 

I already created a PR to address it: #112013

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions