[Python-Dev] Re: Sanity check about ctypes

2022-01-06 Thread Yonatan Zunger
I think it makes good sense for the type-checking reason: _CData *does* declare a fairly useful base interface that other classes also expose, so saying that a function takes a _CData argument can make good sense. (As a bunch of the methods in the io library do, for example) typeshed hacks it for

[Python-Dev] Re: Sanity check about ctypes

2022-01-05 Thread Gregory P. Smith
On Wed, Jan 5, 2022 at 3:17 PM Yonatan Zunger wrote: > Hey everyone. > > Quick sanity check: The ctypes docs > refer to > _CData as a non-public class which is in the module, but _ctypes.c doesn't > actually export it >