On 20 January 2017 at 16:51, Elizabeth Myers <elizab...@interlinked.me> wrote:
> Should I write up a PEP about this? I am not sure if it's justified or
> not. It's 3 changes (calcsize and two format specifiers), but it might
> be useful to codify it.

It feels a bit minor to need a PEP, but having said that did you pick
up on the comment about needing to return the number of bytes
consumed?

str = struct.unpack('z', b'test\0xxx')

How do we know where the unpack got to, so that we can continue
parsing from there? It seems a bit wasteful to have to scan the string
twice to use calcsize for this...

A PEP (or at least, a PEP-style design document) might capture the
answer to questions like this. OTOH, the tracker discussion could
easily be enough - can you put a reference to the bug report here?

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to