[Python-ideas] A python bridge between versions

Chris Angelico rosuav at gmail.com
Fri Feb 28 13:24:50 CET 2014


On Fri, Feb 28, 2014 at 8:16 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> I'm been thinking of doing something like this but the other way
> around - embed Python2 in Python3. When starting to brainstorm
> that idea, I quickly ended up postponing the idea again due to
> problems with C extension linking, dual interpreter environments,
> object interfacing between the two worlds, having two separate
> exception class trees, two sets of basic types/classes, two GILs,
> etc.

The another common solution is to make the two halves completely
language-independent. Separate two processes with a pipe, socket, etc,
and communicate with streams of bytes moving back and forth. I'd
consider that to be the zero-mark for any blending solution: it's
simple, it's straight-forward, it's guaranteed to work, so you have to
make something that's better than that - faster, easier to use,
cleaner, whatever. That's the mark to beat.

ChrisA


More information about the Python-ideas mailing list