Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-28 Thread Antoine Pitrou
Thomas Breuel gmail.com> writes: > > How can you bring up practical problems against something that hasn't been implemented? The PEP is simple enough that you can simulate its effect by manually computing the resulting unicode string for a hypothetical broken filename. Several people have alread

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-28 Thread Antoine Pitrou
Paul Moore gmail.com> writes: > > I've yet to hear anyone claim that they would have an actual problem > with a specific piece of code they have written. Yep, that's the problem. Lots of theoretical problems noone has ever encountered brought up against a PEP which resolves some actual problems

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Michael Foord
Stephen J. Turnbull wrote: Antoine Pitrou writes: > > or (better for 2.x, where bytes are strings as far as most > > programmers are concerned) as a new data type, > > I'm -1 on any new string-like type (for file paths or whatever > else) with custom encoding/decoding semantics. It's the

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Antoine Pitrou
Simon Cross gmail.com> writes: > > $ touch $'\xFF\xAA\xFF' > $ vi $'\xFF\xAA\xFF' > $ egrep foo $'\xFF\xAA\xFF' > > All worked fine from my Bash shell with locale encoding set to UTF-8. The PEP is precisely about making py3k able to better handle these files (right now os.listdir() doesn't retu

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Tony Nelson
At 16:09 + 04/27/2009, Antoine Pitrou wrote: >Stephen J. Turnbull xemacs.org> writes: >> >> I hate to break it to you, but most stages of mail processing have >> very little to do with SMTP. In particular, processing MIME >> attachments often requires dealing with file names. > >AFAIK, the fi

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Stephen J. Turnbull
Antoine Pitrou writes: > > or (better for 2.x, where bytes are strings as far as most > > programmers are concerned) as a new data type, > > I'm -1 on any new string-like type (for file paths or whatever > else) with custom encoding/decoding semantics. It's the best way to > ruin the clean

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-27 Thread Antoine Pitrou
Stephen J. Turnbull xemacs.org> writes: > > I hate to break it to you, but most stages of mail processing have > very little to do with SMTP. In particular, processing MIME > attachments often requires dealing with file names. AFAIK, the file name is only there as an indication for the user whe

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System C haracter Interfaces

2009-04-25 Thread Antoine Pitrou
Paul Moore gmail.com> writes: > But those > people are also the *least* likely people to contribute on an > English-speaking list, I guess (Sincere apologies if everyone but > me on this list happens to actually be fluent English-speaking > Russians ) Actually, we're all Finnish. Regards, Ă…nto