Totally confused by the str/bytes/unicode differences introduced in Pythyon 3.x

Steve Holden steve at holdenweb.com
Fri Jan 16 23:08:26 EST 2009


Giampaolo Rodola' wrote:
> On 17 Gen, 04:43, Terry Reedy <tjre... at udel.edu> wrote:
>> Giampaolo Rodola' wrote:
>>> That would help to avoid replacing "" with b"" almost everywhere in my
>>> code.
>> Won't 2to3 do that for you?
> 
> I used 2to3 against my code but it didn't cover the "" -> b""
> conversion (and I doubt it is able to do so, anyway).
> 
Note that if you are using 2.6 you should first convert your "" quotes
to b"" - this won't make any practical difference, but then you will be
able to run 2to3 on your code and (one hopes) covert for 3.0 automatically.

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list