file open fails.

Rhodri James rhodri at wildebst.demon.co.uk
Tue Mar 24 20:55:55 EDT 2009


On Tue, 24 Mar 2009 22:48:30 -0000, Wes James <comptekki at gmail.com> wrote:

> On Tue, Mar 24, 2009 at 4:32 PM, Wes James <comptekki at gmail.com> wrote:
>> \T might mean the same thing as \t (tab), but I thought it would be  
>> different...
>
>
> I guess not:
>
> http://docs.python.org/reference/lexical_analysis.html#string-literals
>
> Wonder why when I do print "test\Ttest" vs print "test\ttest"  \T just
> get printed?

Because "\T" has no special meaning, so is just a two character sequence
like any other in the literal.  'print' just prints the string.

print repr("test\Ttest"), repr("test\ttest")

might be illuminating?


-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list