[Doc-SIG] suggestions for a PEP

Edward D. Loper edloper@gradient.cis.upenn.edu
Tue, 20 Mar 2001 15:44:18 EST

>> Have we
>> considered the classic spec for labels to appear left of a colon, namely
>> RFC 822 (e-mail headers) and its kin ?  I think that basically comes
>> down to r'\w+(-\w+)*' as regex, generally specified
>> [...]

Fine with me.

>> We might want
>> to allow _ as well as \w (indeed, we might want to define \w to include
>> _ given that python effectively does so).

I asssumed we were treating '\w' as it's defined in the re module, in
which case it already does include '_':

  >>> re.match('\w', '_')
  <re.MatchObject instance at 125e00>

Basically re defines '\w' = '[0-9a-zA-Z_]