Re: [Python-Dev] XML codec?

2007-11-08 Thread Walter Dörwald
Martin v. Löwis wrote: >> Any comments? > > -1. First, (as already discussed on the tracker,) "xml" is a bad name > for an encoding. How would you encode "Hello" "in xml"? Then how about the suggested "xml-auto-detect"? > Then, I'd claim that the problem that the codec solves doesn't really > ex

[Python-Dev] Summary of Tracker Issues

2007-11-08 Thread Tracker
ACTIVITY SUMMARY (11/01/07 - 11/08/07) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1319 open (+18) / 11570 closed (+19) / 12889 total (+37) Open issues with patches: 419 Average durati

Re: [Python-Dev] XML codec?

2007-11-08 Thread Martin v. Löwis
> Then how about the suggested "xml-auto-detect"? That is better. >> Then, I'd claim that the problem that the codec solves doesn't really >> exist. IOW, most XML parsers implement the auto-detection of encodings, >> anyway, and this is where architecturally this functionality belongs. > > But n

Re: [Python-Dev] XML codec?

2007-11-08 Thread Walter Dörwald
Walter Dörwald wrote: > Martin v. Löwis wrote: > > [...] >>> Correct, but as long as Python doesn't have an EBCDIC codec, that won't >>> help much. Adding *detection* of EBCDIC to detect_xml_encoding() is >>> rather simple though. >> But it does! cp037 is EBCDIC, and supported by Python. > > I d

Re: [Python-Dev] XML codec?

2007-11-08 Thread Martin v. Löwis
> ci = codecs.lookup("xml-auto-detect") > p = expat.ParserCreate() > e = "utf-32" > s = (u"" % e).encode(e) > s = ci.encode(ci.decode(s)[0], encoding="utf-8")[0] > p.Parse(s, True) So how come the document being parsed is recognized as UTF-8? > OK, so should I put the C code into a _xml module?

Re: [Python-Dev] XML codec?

2007-11-08 Thread Walter Dörwald
Martin v. Löwis wrote: >> Then how about the suggested "xml-auto-detect"? > > That is better. OK. >>> Then, I'd claim that the problem that the codec solves doesn't really >>> exist. IOW, most XML parsers implement the auto-detection of encodings, >>> anyway, and this is where architecturally t

Re: [Python-Dev] XML codec?

2007-11-08 Thread Adam Olsen
On 11/8/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > > >> Then how about the suggested "xml-auto-detect"? > > > > That is better. > > OK. > > >>> Then, I'd claim that the problem that the codec solves doesn't really > >>> exist. IOW, most XML parsers implement the auto-d

[Python-Dev] hex() and oct() still include the trailing L - change this in 2.6?

2007-11-08 Thread Gregory P. Smith
I thought the hell of stripping trailing Ls off of stringed numbers was gone but it appears that the hex() and oct() builtins still leave the trailing 'L' on longs: Python 2.6a0 (trunk:58846M, Nov 4 2007, 15:44:12) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits"

Re: [Python-Dev] hex() and oct() still include the trailing L - change this in 2.6?

2007-11-08 Thread Brett Cannon
On Nov 8, 2007 6:05 PM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > I thought the hell of stripping trailing Ls off of stringed numbers was gone > but it appears that the hex() and oct() builtins still leave the trailing > 'L' on longs: > > Python 2.6a0 (trunk:58846M, Nov 4 2007, 15:44:12) > [GC

Re: [Python-Dev] hex() and oct() still include the trailing L - change this in 2.6?

2007-11-08 Thread Guido van Rossum
On Nov 8, 2007 6:18 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On Nov 8, 2007 6:05 PM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > > I thought the hell of stripping trailing Ls off of stringed numbers was gone > > but it appears that the hex() and oct() builtins still leave the trailing > > 'L