Hi, > However, I think we can safely say that the Python community has not > effectively done this over our twenty-plus year lifetime.
I'd like to offer a couple remarks here: 1) implementing a protocol usually goes beyond parsing (which, it's true, can easily be done "sans IO"). 2) many non-trivial protocols are stateful, at least at the level of a single connection; the statefulness may require doing I/O spontaneously (example: sending a keepalive packet). You can partly solve this by having a lower layer implementing the stateless parts ("sans IO") and an upper layer implementing the rest above it, but depending on the protocol it may be impossible to offer an *entire* implementation that doesn't depend on at least some notion of I/O. 3) the Protocol abstraction in asyncio (massively inspired from Twisted, of course) is a pragmatic way to minimize the I/O coupling of protocol implementations (and one of the reasons why I pushed for it during the PEP discussion): it still has some I/O-related elements to it (a couple callbacks on Protocol, and a couple methods on Transport), but in a way that makes ignoring them much easier than when using "streams", sockets or similar concepts. Regards Antoine. _______________________________________________ Async-sig mailing list Async-sig@python.org https://mail.python.org/mailman/listinfo/async-sig Code of Conduct: https://www.python.org/psf/codeofconduct/