Confusing sentence at http://docs.python.org/tutorial/introduction.html#strings

http://docs.python.org/tutorial/introduction.html#strings The statement "Note that newlines still need to be embedded in the string using \n; the newline following the trailing backslash is discarded. This example would print the following:" is confusing with the semicolon in that sentence. I was looking for a semicolon in the code fragment and thought there was a typo at first. Perhaps the following would be clearer? ""Note that newlines still need to be embedded in the string using \n ; the newline following the trailing backslash is discarded. This example would print the following:" The gray color on the command-line would then have enough white space to differentiate it from the semicolon. Or maybe i just need to buy a better monitor! :D

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.06.2010 01:54, schrieb dave000:
http://docs.python.org/tutorial/introduction.html#strings
The statement "Note that newlines still need to be embedded in the string using \n; the newline following the trailing backslash is discarded. This example would print the following:" is confusing with the semicolon in that sentence. I was looking for a semicolon in the code fragment and thought there was a typo at first.
Perhaps the following would be clearer? ""Note that newlines still need to be embedded in the string using \n ; the newline following the trailing backslash is discarded. This example would print the following:"
The gray color on the command-line would then have enough white space to differentiate it from the semicolon.
I've replaced the semicolon by a dash now, should be easier to read. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) iEYEARECAAYFAkwnLBgACgkQN9GcIYhpnLDQNQCgmi4YW7erBmnzWVEykJ+Az1au pJkAn0BzoAL+CmjHhO4gBSPa//TSIpKZ =+a5+ -----END PGP SIGNATURE-----
participants (2)
-
dave000
-
Georg Brandl