Is there any way to make repr(aString) use double quotes?
Lulu of the Lotus-Eaters
mertz at gnosis.cx
Tue Apr 8 15:10:54 EDT 2003
tweedgeezer at hotmail.com (Jeremy Fincher) wrote previously:
|If it's not, then is it possible to achieve the same thing (everything
|escaped properly, etc.) through other means?
It's not beautiful, but this does what you want:
'"%s"' % repr(aString)[1:-1]
--
mertz@ | The specter of free information is haunting the `Net! All the
gnosis | powers of IP- and crypto-tyranny have entered into an unholy
.cx | alliance...ideas have nothing to lose but their chains. Unite
| against "intellectual property" and anti-privacy regimes!
-------------------------------------------------------------------------
More information about the Python-list
mailing list