%r

Blackbird fake at nospam.no
Mon Mar 6 12:13:51 EST 2006


Duncan Booth wrote:
> Blackbird wrote:
>
>> [...]
>
>>>> a = 'I don\'t think so'
>>>> print '%r' % a
> "I don't think so"
>>>> a = r'I don\'t think so'
>>>> print "'%s'" % a
> 'I don\'t think so'

Excellent counterexample.  Can something like this happen for other things
than quotes?





More information about the Python-list mailing list