%r
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

%r

From: Blackbird <fake@nospam.no>
Date: Mon Mar 06 2006 - 17:33:20 CET

I'm trying to get a complete grip on %r. Is it true that the two programs

a = '*anything the parser accepts*'
print '%r' % a

vs.

a = r'*anything the parser accepts*'
print "'%s'" % a

always produce the same output, where *anything the parser accepts* can be
replaced with, well, anything the parser accepts?
Received on Sun Apr 30 10:58:47 2006