> So, I wonder why most languages do not allow that from scratch; > and some, like python, need a special syntax for multi-line strings. > This is no parsing issue: instead, the pattern is simpler for it > does need to refuse newlines!
I believe it's a deliberate design decision, not lack of ability to parse multi-line strings. You're right, it's easy for the compiler to handle the case. What happens too often, though, is that people forget a quote somewhere, so the compiler interprets that, plus a lot of lines of code following it, as a valid multi-line string, leading to confusion and possibly misleading error messages. So by making you explicitly state when you wanted multi-line strings, it makes it easier to spot this common mistake as well as making your intent more clear when just looking at the code. -- Steve Willoughby | Using billion-dollar satellites st...@alchemy.com | to hunt for Tupperware. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor