Friday, May 7, 2010

Python and Quotes - how?

More from Python interpreter:
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
Does it mean there is no way to have both single and double quotes in a Python literal???

Update: it seems to be an interpreter bug:
result = '"Isn\'t," she said.'
print result
would produce the expected
"Isn't," she said.
after all :)

No comments:

Post a Comment