New submission from Jim Jewett <[EMAIL PROTECTED]>: feedparser defines four regexs for end-of-line, but two are redundant.
NLCRE checks for the three common line endings. NLCRE_crack also captures the line ending. NLCRE_eol also adds a $ to ensure it is at the end. NLCRE_bol ... is identical to NLCRE_crack. It should either use a ^ to insist on line-start, or be explicitly the same. (e.g., NLCRE_bol=NLCRE_crack.) (It gets away with not listing the ^ because the current code only uses NLCRE_bol.match. (Actually, if the regexes are considered private, then the current code could just use the bound methods directly ... setting NLCRE_bol to the .match method, NLCRE_eol to the .search method, and NLCRE_crack to the .split method.) ---------- components: Library (Lib) messages: 65723 nosy: jimjjewett severity: normal status: open title: email.feedparser regex duplicate versions: Python 2.6, Python 3.0 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2679> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com