I came across this case while debugging some Python code that contained an
error stemming from the use of multiline strings as comments. The code
contained a very long list of objects, and I had commented out some of the
objects using the multiline string. This caused a string to be appended to
the list instead of ignoring the section. Consider the following code:

list = [
Object1(arg),
"""
Object2(arg),
Object3(arg),
"""
Object4(arg)
]

Real multiline comments would produce [Object1, Object4]. The list, in
fact, contains [Object1, "Object2, Object3", Object4]. I can't really see a
good way to get around this without true multiline comments.

- Jordan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to