Skip to content

Commit b239ab9

Browse files
ZackerySpytzbenjaminp
authored andcommitted
closes bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801)
1 parent 289c5ea commit b239ab9

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

Lib/email/feedparser.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,6 @@ def push(self, data):
117117
self._partial = [parts.pop()]
118118
self.pushlines(parts)
119119

120-
def pushlines(self, lines):
121-
# Crack into lines, but preserve the newlines on the end of each
122-
parts = NLCRE_crack.split(data)
123-
# The *ahem* interesting behaviour of re.split when supplied grouping
124-
# parentheses is that the last element of the resulting list is the
125-
# data after the final RE. In the case of a NL/CR terminated string,
126-
# this is the empty string.
127-
self._partial = parts.pop()
128-
#GAN 29Mar09 bugs 1555570, 1721862 Confusion at 8K boundary ending with \r:
129-
# is there a \n to follow later?
130-
if not self._partial and parts and parts[-1].endswith('\r'):
131-
self._partial = parts.pop(-2)+parts.pop()
132-
# parts is a list of strings, alternating between the line contents
133-
# and the eol character(s). Gather up a list of lines after
134-
# re-attaching the newlines.
135-
lines = []
136-
for i in range(len(parts) // 2):
137-
lines.append(parts[i*2] + parts[i*2+1])
138-
self.pushlines(lines)
139-
140120
def pushlines(self, lines):
141121
# Reverse and insert at the front of the lines.
142122
self._lines[:0] = lines[::-1]

0 commit comments

Comments
 (0)