09-08-2009 o 23:43:14 r <rt8...@gmail.com> wrote:
#-- el bueno --# "hello i am a very long string that\ does not like newlines so please \ escape me, Thank you!"
You probably ment: """hello i am... [etc.] Anyway... You're right that generally it's good idea to define dialog prompts and such stuff separately rather that to hardcode it, especially in big projects. Then certainly multiline string literals are useful (though, if you need to get rid of newlines, IMHO "el feo" method is more elegant and less error prone than your "el bueno" [possible invisible space after '\']). But there are plenty of other situations when it's better (in practice) to have strings (even long) together with your code, e.g. log information for debugging, or Cheers, *j -- http://mail.python.org/mailman/listinfo/python-list