Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's horrible about the "polyglot" approach?

Beyond not getting to take full advantage of python3, it's really a relatively painless solution (though when you hit the pain points (bytes vs strings vs unicode) you'll notice).



There's nothing particularly wrong with it (honestly polyglot should have been python 3.1, with new features at they rolled to 3.2, 3.3, etc. in my opinion); but if the reason for using python 3 is that it has shiny new features (like async io), it's a bit of bummer because you can't use them if your library is py2 compatible.

...which kind of makes it 'python 3 but actually python 2 running on the python 3 runtime', and the code is harder to maintain than either python 2 or python 3 (twice as much testing to do too).

Not really much of a carrot for library developers to support python 3.


what kind of library could transparently use async IO, or not, based on platform? using explicit async for anything dramatically changes the behavior and public API of the code.

there is of course a huge carrot for library developers to support python 3 which is, so that python 3 users can use your library, rather than having all of your work replaced by something else and generally holding back the community.


Very true.

It's still better than the option of maintaining two separate codebases, i.m.o., though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: