Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-09 Thread Nick Coghlan
On 9 Jan 2014 22:08, "Antoine Pitrou" wrote: > > On Thu, 9 Jan 2014 09:03:40 -0500 > Daniel Holth wrote: > > They emphatically do not want the Python 2 > > model especially not implicit coercion. They only want additional > > tools for text or string processing in Python 3. > > That's a good poin

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-09 Thread Antoine Pitrou
On Thu, 9 Jan 2014 09:03:40 -0500 Daniel Holth wrote: > They emphatically do not want the Python 2 > model especially not implicit coercion. They only want additional > tools for text or string processing in Python 3. That's a good point. Now it's up to people who need those additional tools to p

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-09 Thread Daniel Holth
So the customer you're looking for is the person who cares a lot about encodings, knows how to do Unicode correctly, and has noticed that certain valid cases not limited to imperialist simpletons (dealing with specific common things invented before 1996, dealing with mixed encodings, doing what Nic

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-09 Thread Antoine Pitrou
On Thu, 9 Jan 2014 17:09:10 +1000 Nick Coghlan wrote: > > There's also the fact that POSIX folks are used to "r" and "rb" being > the same thing. Which fails immediately under Windows :-) Regards Antoine. ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Nick Coghlan
On 9 January 2014 15:22, Greg Ewing wrote: > Kristján Valur Jónsson wrote: >> >> all you want is to open that .txt >> file on the drive and extract some phone numbers and merge in some email >> addresses. What encoding does the file have? Do I care? Must I care? > > > To some extent, yes. If the e

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Greg Ewing
Kristján Valur Jónsson wrote: all you want is to open that .txt file on the drive and extract some phone numbers and merge in some email addresses. What encoding does the file have? Do I care? Must I care? To some extent, yes. If the encoding happens to be an ascii-compatible one, such as latin

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Dan Stromberg
On Wed, Jan 8, 2014 at 2:04 PM, Kristján Valur Jónsson wrote: > > Believe it or not, sometimes you really don't care about encodings. > Sometimes you just want to parse text files. Python 3 forces you to think > about abstract concepts like encodings when all you want is to open that .txt > fil

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Terry Reedy
On 1/8/2014 5:04 PM, Kristján Valur Jónsson wrote: Believe it or not, sometimes you really don't care about encodings. Sometimes you just want to parse text files. Python 3 forces you to think about abstract concepts like encodings when all you want is to open that .txt file on the drive and ex

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread R. David Murray
On Thu, 09 Jan 2014 00:12:57 +, wrote: > I think there might be a different analogy: Having to specify an > encoding is like having strong typing. In Python 2.7, we _can_ forego > that and just duck-type our strings :) Python is a strongly typed language. Saying that python2 let you duck t

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Mark Lawrence
On 09/01/2014 00:12, Kristján Valur Jónsson wrote: Just to avoid confusion, let me state up front that I am very well aware of encodings and all that, having internationalized one largish app in python 2.x. I know the problems that 2.x had with tracking down the source of errors and understan

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Kristján Valur Jónsson
, 2014 23:40 To: python-dev@python.org Subject: Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...) Why *do* you care? Isn't your system configured for utf-8, and all your .txt files encoded with utf-8 by default? Or at least configured with a single consist

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Isaac Morland
On Wed, 8 Jan 2014, Kristján Valur Jónsson wrote: Believe it or not, sometimes you really don't care about encodings. Sometimes you just want to parse text files. Python 3 forces you to think about abstract concepts like encodings when all you want is to open that .txt file on the drive and

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread R. David Murray
On Wed, 08 Jan 2014 22:04:56 +, wrote: > Believe it or not, sometimes you really don't care about encodings. > Sometimes you just want to parse text files. Python 3 forces you to > think about abstract concepts like encodings when all you want is to > open that .txt file on the drive and extr

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Victor Stinner
Hi, > Python 3 forces you to think about abstract concepts like encodings when all > you want is to open that .txt file on the drive and extract some phone > numbers and merge in some email addresses. You can open a text file using ascii + surrogateescape, or just open the file in binary. Vic

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Joao S. O. Bueno
On 8 January 2014 20:04, Kristján Valur Jónsson wrote: > Believe it or not, sometimes you really don't care about encodings. > Sometimes you just want to parse text files. Python 3 forces you to think > about abstract concepts like encodings when all you want is to open that .txt > file on the

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread Kristján Valur Jónsson
__ From: Python-Dev [python-dev-bounces+kristjan=ccpgames@python.org] on behalf of R. David Murray [rdmur...@bitdance.com] Sent: Wednesday, January 08, 2014 21:29 To: python-dev@python.org Subject: Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...) ... It

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-08 Thread R. David Murray
On Wed, 08 Jan 2014 19:22:08 +, "Matt Billenstein" wrote: > I started in Python blissfully unaware of unicode - it was a different time > for > sure, but what I knew from C worked pretty much the same in Python - I could > read some binary data out of a file, twiddle some bits, and write it b