class_docstr: A file-ish object that can have new data loaded into it.
  
  You can also push and pop line-matching predicates onto a stack.  When the
  current predicate matches the current line, a false EOF response
  (i.e. empty string) is returned instead.  This lets the parser adhere to a
  simple abstraction -- it parses until EOF closes the current message.
class_docstr_tok: ["A","file-ish","object","that","can","have","new","data","loaded","into","it",".","You","can","also","push","and","pop","line-matching","predicates","onto","a","stack",".","When","the","current","predicate","matches","the","current","line",",","a","false","EOF","response","(","i.e",".","empty","string",")","is","returned","instead",".","This","lets","the","parser","adhere","to","a","simple","abstraction","--","it","parses","until","EOF","closes","the","current","message","."]
docstr: Push some new data into this object.
docstr_tok: ["Push","some","new","data","into","this","object","."]
code: def push(self, data):
      """Push some new data into this object."""
      self._partial.write(data)
      if "\n" not in data and "\r" not in data:
          # No new complete lines, wait for more.
          return
  
      # Crack into lines, preserving the linesep characters.
      self._partial.seek(0)
      parts = self._partial.readlines()
      self._partial.seek(0)
      self._partial.truncate()
  
      # If the last element of the list does not end in a newline, then treat
      # it as a partial line.  We only check for '\n' here because a line
      # ending with '\r' might be a line that was split in the middle of a
      # '\r\n' sequence (see bugs 1555570 and 1721862).
      if not parts[-1].endswith("\n"):
          self._partial.write(parts.pop())
      self.pushlines(parts)
  
imports: import re
  from email import errors
  from email._policybase import compat32
  from collections import deque
  from io import StringIO
label_desc: Use image node_id 7 for calling the BufferedSubFile obj's underlying member method code with example usage: obj.push(data) without return types