[Python-ideas] from __past__ import division, str, etc

Stephen J. Turnbull stephen at xemacs.org
Wed Jan 8 18:21:12 CET 2014


Nick Coghlan writes:

 > Anyway, the problems impacting wire protocol developers are known,
 > but it's been damnably difficult to get anything other than "I like
 > Python 2 better" out of them when it comes to discussing possible
 > *solutions*

Good to know you feel that way too, I thought I just missed a lot of
important discussions. :-(

 > The main challenge is thus getting people to stop asking the question
 > "How do we bring back the Python 2 text model" (which is never going
 > to happen - we changed the model for a reason), and instead ask "What
 > changes can be made to Python 3, such as introducing additional
 > purpose specific types, to make it a better language for wire protocol
 > development?".

After spending enough time on Inada-san's use-case to find a real
problem with treating wire protocols as text, I've come to the
conclusion that those really are the same question, though.  Add even
a little bit of binary handling to a database connection, and even
though almost everything is actually just ASCII, the few things that
aren't blow everything up and you want everything to be bytes.

At that point you end up really wanting bytes to have pretty much
everything str does except maybe unidata lookups!


More information about the Python-ideas mailing list