sape hat geschrieben:Hi.
Code: Alles auswählen
::
Whitespace, newlines, blank lines, and
all kinds of markup (like *this* or
\this) is preserved by literal blocks.
Wenn ich das so verwende und dann epidoc benutze wird mir das \ nicht angezeigt. Warum?
Weil da in der letzten Zeile '\t' am Anfang steht, also ein Tabulator-Zeichen.
Hab auch ein Problem bei >>>.
Wenn ich z.B.
Code: Alles auswählen
"""
>>> li = ["print 'foobar'", "def \\\n", "foobar\\\n", "():", " pass"]
"""
gibt es Probleme mit den \\\n.
Jo:
Code: Alles auswählen
In [7]: a = """
...: >>> li = ["print 'foobar'", "def \\\n", "foobar\\\n", "():", " pass"] ...: """
In [8]: print a
>>> li = ["print 'foobar'", "def \
", "foobar\
", "():", " pass"]
Line 263: Definition list ends without a blank line: unexpected unident
Stimmt aber nicht die Fehlermeldung
Vielleicht stimmt sie doch. Ohne den Quelltext um das nachvollziehen zu können, lässt sich das aber schlecht sagen.
P.S.: Auf ``def \\\\\\n`` statt ``def \\\n`` habe ich keine Bock, weil man die Doku auch mit `help()` lesen und ohne epidoc output verstehen können sollte...
Hast Du Deine Doku mal mit `help()` ausprobiert?
Code: Alles auswählen
In [9]: def f():
...: """
...: >>> li = ["print 'foobar'", "def \\\n", "foobar\\\n", "():", " pass"]
...: """
...: pass
...:
In [10]: help(f)
Help on function f in module __main__:
f()
>>> li = ["print 'foobar'", "def \
", "foobar\
", "():", " pass"]
Das ist nicht das was Du willst oder?