[Python-Dev] Accepting PEP 3154 for 3.4? (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Tue Nov 19 20:59:20 CET 2013


On Tue, 19 Nov 2013 13:22:52 -0600 Tim Peters <tim.peters at gmail.com> wrote:

[Guido] > So using an opcode for framing is out? (Sorry, I've lost track of the > back-and-forth.)

It was never in ;-) I'd prefer one, but not enough to try to block the PEP. As is, framing is done at a "lower level" than opcode decoding. I fear this is brittle, for all the usual "explicit is better than implicit" kinds of reasons. The only way now to know that you're looking at a frame size is to keep a running count of bytes processed and realize you've reached a byte offset where a frame size "is expected".

That's integrated to the built-in buffering. It's not really an additional constraint: the frame sizes simply dictate how buffering happens in practice. The main point of framing is to simplify the buffering logic (of course, the old buffering logic is still there for protocols <= 3, unfortunately).

Note some drawbacks of frame opcodes:

Regards

Antoine.



More information about the Python-Dev mailing list