parameters: (self)
return_statement: return True
docstring: Return whether a block of interactive input can accept more input.
  
          This method is meant to be used by line-oriented frontends, who need to
          guess whether a block is complete or not based solely on prior and
          current input lines.  The InputSplitter considers it has a complete
          interactive block and will not accept more input when either:
          
          * A SyntaxError is raised
  
          * The code is complete and consists of a single line or a single
            non-compound statement
  
          * The code is complete and has a blank line at the end
  
          If the current input produces a syntax error, this method immediately
          returns False but does *not* raise the syntax error exception, as
          typically clients will want to send invalid syntax to an execution
          backend which might convert the invalid syntax into valid Python via
          one of the dynamic IPython mechanisms.
docstring_summary: Return whether a block of interactive input can accept more input.
docstring_tokens: Return whether a block of interactive input can accept more input .
function: def push_accepts_more(self):
          """Return whether a block of interactive input can accept more input.
  
          This method is meant to be used by line-oriented frontends, who need to
          guess whether a block is complete or not based solely on prior and
          current input lines.  The InputSplitter considers it has a complete
          interactive block and will not accept more input when either:
          
          * A SyntaxError is raised
  
          * The code is complete and consists of a single line or a single
            non-compound statement
  
          * The code is complete and has a blank line at the end
  
          If the current input produces a syntax error, this method immediately
          returns False but does *not* raise the syntax error exception, as
          typically clients will want to send invalid syntax to an execution
          backend which might convert the invalid syntax into valid Python via
          one of the dynamic IPython mechanisms.
          """
  
          # With incomplete input, unconditionally accept more
          # A syntax error also sets _is_complete to True - see push()
          if not self._is_complete:
              #print("Not complete")  # debug
              return True
          
          # The user can make any (complete) input execute by leaving a blank line
          last_line = self.source.splitlines()[-1]
          if (not last_line) or last_line.isspace():
              #print("Blank line")  # debug
              return False
          
          # If there's just a single line or AST node, and we're flush left, as is
          # the case after a simple statement such as 'a=1', we want to execute it
          # straight away.
          if self.get_indent_spaces() == 0:
              if len(self.source.splitlines()) <= 1:
                  return False
              
              try:
                  code_ast = ast.parse(u''.join(self._buffer))
              except Exception:
                  #print("Can't parse AST")  # debug
                  return False
              else:
                  if len(code_ast.body) == 1 and \
                                      not hasattr(code_ast.body[0], 'body'):
                      #print("Simple statement")  # debug
                      return False
  
          # General fallback - accept more code
          return True
function_tokens: def push_accepts_more ( self ) : # With incomplete input, unconditionally accept more # A syntax error also sets _is_complete to True - see push() if not self . _is_complete : #print("Not complete")  # debug return True # The user can make any (complete) input execute by leaving a blank line last_line = self . source . splitlines ( ) [ - 1 ] if ( not last_line ) or last_line . isspace ( ) : #print("Blank line")  # debug return False # If there's just a single line or AST node, and we're flush left, as is # the case after a simple statement such as 'a=1', we want to execute it # straight away. if self . get_indent_spaces ( ) == 0 : if len ( self . source . splitlines ( ) ) <= 1 : return False try : code_ast = ast . parse ( u'' . join ( self . _buffer ) ) except Exception : #print("Can't parse AST")  # debug return False else : if len ( code_ast . body ) == 1 and not hasattr ( code_ast . body [ 0 ] , 'body' ) : #print("Simple statement")  # debug return False # General fallback - accept more code return True