"More About Unicode in Python 2 and 3"

Ned Batchelder ned at nedbatchelder.com
Sun Jan 5 21:17:05 EST 2014


On 1/5/14 8:48 PM, Chris Angelico wrote:
> On Mon, Jan 6, 2014 at 12:16 PM, Ned Batchelder <ned at nedbatchelder.com> wrote:
>> So now we have two revered developers vocally having trouble with Python 3.
>> You can dismiss their concerns as niche because it's only network
>> programming, but that would be a mistake.
>
> IMO, network programming (at least on the internet) is even more Py3's
> domain (pun not intended).
>
> 1) The internet is global. You WILL come across other languages, other
> scripts, everything.
>
> 2) In most cases, everything is clearly either text or binary, and
> usually text has an associated (and very clear) encoding (eg HTTP
> headers). If it's not explicitly given, the RFCs will often stipulate
> what the encoding should be. It's pretty easy, you don't have to go
> "Is this Latin-1? Maybe CP-1252? Could it be something else?".
>
> 3) The likelihood is high that you'll be working with someone else's
> code at the other end. Ties in with #2 - this is why the specs are so
> carefully written. Getting these things right is incredibly important.
>
> If I'm writing something that might have to work with anything from
> anywhere, I want a system that catches potential errors earlier rather
> than later. I don't want to write interpolated SQL that works
> perfectly until Mr O'Hara tries to sign up (or, worse, young Robert
> whose sister is named "Help I'm trapped in a driver's license
> factory"); I want to get it right from the start. Yes, that means more
> work to get "Hello, World" going. Yes, it means that I need to get my
> head around stuff that I didn't think I'd have to. (One time I
> implemented Oauth manually rather than using a library - the immediate
> reason was some kind of issue with the library, but I was glad I did,
> because it meant I actually understood what was going on; came in
> handy about two weeks later when the far end had a protocol problem.)
>
> Most of the complaints about Py3 are "it's harder to get something
> started (or port from Py2)". My answer is that it's easier to get
> something finished.

I like all of this logic, it makes sense to me.  But Armin and Kenneth 
have more experience than I do actually writing networking software. 
They are both very smart and very willing to do a ton of work.  And both 
are unhappy.  I don't know how to square that with the logic that makes 
sense to me.

And no amount of logic about why Python 3 is better is going to solve 
the problem of the two of them being unhappy.  They are speaking from 
experience working with the actual product.

I'm not trying to convince anyone that Python 3 is good or bad.  I'm 
talking about our approach to unhappy and influential customers.

-- 
Ned Batchelder, http://nedbatchelder.com




More information about the Python-list mailing list