This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients larry, methane, serhiy.storchaka, vstinner
Date 2017-01-27.09:49:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485510553.24.0.397613645704.issue29300@psf.upfronthosting.co.za>
In-reply-to
Content
The converter for the format parameter already exists. It is cache_struct(). You just need to change its interface.

> * Fix Struct.__init__() error message: the method accepts also Unicode
> * Document that Struct accepts str encodable to ASCII and bytes

I think this should be backported to older versions. Maybe there is an open issue for this.

> I would be nice to use Py_buffer format for the "buffer" argument of iter_unpack(), but Argument Clinic calls PyBuffer_Release(&buffer), whereas the buffer should stay alive after the function exit. Is there a way to clone/copy a Py_buffer?

I agreed that the Py_buffer converter is not applicable here. Just object is good.
History
Date User Action Args
2017-01-27 09:49:13serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, larry, methane
2017-01-27 09:49:13serhiy.storchakasetmessageid: <1485510553.24.0.397613645704.issue29300@psf.upfronthosting.co.za>
2017-01-27 09:49:13serhiy.storchakalinkissue29300 messages
2017-01-27 09:49:13serhiy.storchakacreate