zlacker

[parent] [thread] 2 comments
1. kstrau+(OP)[view] [source] 2025-12-06 22:32:37
I’m a little confused. That’s basically with Python 3 did, right? In py2, “foo” is a string of bytes, and u”foo” is Unicode. In py3, both are Unicode, and bytes() is a string of bytes.
replies(1): >>JoshTr+Sq
2. JoshTr+Sq[view] [source] 2025-12-07 03:15:39
>>kstrau+(OP)
The difference is that the two don't interoperate. You can't import a Python 3 module from Python 2 or vice versa; you have to use completely separate interpreters to run them.

I'm suggesting a model in which one interpreter runs both Python 2 and Python 3, and the underlying types are the same, so you can pass them between the two. You'd have to know that "foo" created in Python 2 is the equivalent of b"foo" created in Python 3, but that's easy enough to deal with.

replies(1): >>MangoT+SG
◧◩
3. MangoT+SG[view] [source] [discussion] 2025-12-07 07:13:45
>>JoshTr+Sq
Ok who would suggest this when the community could take a modicum of responsibility
[go to top]