string repr in 2.1

Robin Becker robin at jessikat.fsnet.co.uk
Tue May 29 04:58:49 EDT 2001


In message <20010529102414.P690 at xs4all.nl>, Thomas Wouters
<thomas at xs4all.net> writes
>On Tue, May 29, 2001 at 12:47:39AM +0100, Robin Becker wrote:
>> In article <slrn9h5m4o.1hk.scarblac at pino.selwerd.nl>, Remco Gerlich
>> <scarblac at pino.selwerd.nl> writes
>
>> >Since 2.1, string repr uses heximal escapes instead of octal ones.
>
>> yes I guess all those *nix tools that like octal should be whipped and
>> made to obey the malevolent dictator.
>
>Do you have tools you use to parse quoted (repr'd) Python strings that
>handle octal correctly, but don't handle \x and \n\r escape codes ? Which
>ones ? And were you aware that they were going to break sooner or later,
>just because someone can prefer 'readable' escape codes and feed it that
>instead ? :)
>
Yes I have such tools. One is called Acrobat Reader, another is
traditional sed and awk. My dos grep doesn't seem to like hex, I suppose
I must update it and all other tools. 
 
My C compiler understands octal and the newer ones do hex as well.

I can read octal and do arithmetic in it probably easier than hex. I
don't defend the octal representation it's just very widespread in the
older tools. Our usage of repr was probably stupid as clearly repr can
change. 

How I long for my 18-bit PDP-15 :) what happened to my 15 octal digit
cdc! Oh woe is me! Where are the duo-decimal calculators of yore? 
-- 
Robin Becker




More information about the Python-list mailing list