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 ncogh...@gmail.com 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

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

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 dho...@gmail.com 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

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 solip...@pitrou.net wrote: On Thu, 9 Jan 2014 09:03:40 -0500 Daniel Holth dho...@gmail.com 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

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 m...@vazor.com 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

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

2014-01-08 Thread Kristján Valur Jónsson
-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 is true that in Python3 you *must* learn

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 krist...@ccpgames.com 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

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.

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 +, krist...@ccpgames.com 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

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

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

2014-01-08 Thread Kristján Valur Jónsson
: [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 consistent encoding? If that's the case, Python3 doesn't make you think about

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

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 +, krist...@ccpgames.com 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

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

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 krist...@ccpgames.com 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

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

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 greg.ew...@canterbury.ac.nz 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