A technical ascpect of triple quoted strings is that the "end of lines" are not respected. >>> import zzz >>> zzz.__doc__ 'abc\ndef\n' >>> with open('zzz.py', 'rb') as fo: ... r = fo.read() ... >>> r b'"""abc\r\ndef\r\n"""\r\n' Now, one can argue... jmf