Serhiy Storchaka added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29300>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to