On ordered Lists (was RE: [Doc-SIG] Formalizing ST)
Thu, 29 Mar 2001 14:15:08 -0500
People will write ordered/enumerated lists in all different ways. I think
that it's folly to try to come up with the "perfect" format for an
enumerated list, and limit the docstring parser's recognition to that one
format only. Why limit ourselves to RE-processing here? We're writing
software here! Using Python!
Rather, recognize a variety of formats as potential enumerated lists, and
decide based on the labels. If a "potential enumerated list item" (PELI) is
labeled with a "1.", and is immediately followed by a PELI labeled with a
"2.", we've got an enumerated list. Or "A" followed by "B". Or "i)" followed
by "ii)", etc. We wouldn't have any problem with any of these, even without
requiring blank lines:
"That bird wouldn't *voom* if you put
10000 volts through it!"
1 is all I need.
Whatever gave you such an idea? A murderer? No, not
I. I'd never hurt a fly!
The chances of a PELI labeled with "2" after "1 is all I neeed", or "II."
after the last example, are acceptably small.