def is_multiline(): return document_is_multiline_python(repl.default_buffer.document)
def is_buffer_multiline(): return (self.paste_mode or document_is_multiline_python(python_buffer.document))
def is_buffer_multiline(): return (self.settings.paste_mode or document_is_multiline_python(b.document))
def is_buffer_multiline(): return (self.paste_mode or self.accept_input_on_enter is None or document_is_multiline_python(python_buffer.document))
def is_buffer_multiline(document): return (self.settings.paste_mode or self.settings.currently_multiline or document_is_multiline_python(document))