Any reason why cStringIO in 2.5 behaves different from 2.4?

Stefan Behnel stefan.behnel-n05pAM at web.de
Fri Jul 27 05:10:33 EDT 2007


Stefan Scholl schrieb:
> Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
>> On Fri, 27 Jul 2007 06:47:48 +0200, Stefan Scholl wrote:
>>
>>> Chris Mellon <arkanes at gmail.com> wrote:
>>>> XML is not a string. It's a specific type of bytestream. If you want
>>>> to work with XML, then generate well-formed XML in the correct
>>>> encoding. There's no reason you should have an XML document (as
>>>> opposed to values extracted from that document) in unicode objects at
>>>> all.
>>> The affected method in xml.sax is called parseString()
>> Exactly.  It's *not* called `parseUnicode()`.
> 
> Semantics.
> 
>         >>> u"".__class__.__base__
>         <type 'basestring'>
>         >>> "".__class__.__base__
>         <type 'basestring'>
> 

And it's not called "parseBasestring" either.

Stefan



More information about the Python-list mailing list