On Fri, 22 Mar 2019 at 16:12, Steve Dower <steve.do...@python.org> wrote: > > On 22Mar2019 0433, Antoine Pitrou wrote: > > The question is: why would you use a array.array() with a Windows C API? > > I started replying to this with a whole lot of examples, and eventually > convinced myself that you wouldn't (or shouldn't). > > That said, I see value in having a type for array/struct/memoryview that > "is the same size as wchar_t", since that will avoid people having to > guess (the docs for array in particular are deliberately vague about the > actual size of the various types).
This is pretty much what ctypes provides for dealing with unicode? https://docs.python.org/3/library/ctypes.html#ctypes.create_unicode_buffer Seems a fine place to have things that help with win32 api interactions. Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com