parameters: (self)
return_statement: return nodes.For(target, iter, body, else_, test,
                           recursive, lineno=lineno)
docstring: Parse a for loop.
docstring_summary: Parse a for loop.
docstring_tokens: Parse a for loop .
function: def parse_for(self):
          """Parse a for loop."""
          lineno = self.stream.expect('name:for').lineno
          target = self.parse_assign_target(extra_end_rules=('name:in',))
          self.stream.expect('name:in')
          iter = self.parse_tuple(with_condexpr=False,
                                  extra_end_rules=('name:recursive',))
          test = None
          if self.stream.skip_if('name:if'):
              test = self.parse_expression()
          recursive = self.stream.skip_if('name:recursive')
          body = self.parse_statements(('name:endfor', 'name:else'))
          if next(self.stream).value == 'endfor':
              else_ = []
          else:
              else_ = self.parse_statements(('name:endfor',), drop_needle=True)
          return nodes.For(target, iter, body, else_, test,
                           recursive, lineno=lineno)
function_tokens: def parse_for ( self ) : lineno = self . stream . expect ( 'name:for' ) . lineno target = self . parse_assign_target ( extra_end_rules = ( 'name:in' , ) ) self . stream . expect ( 'name:in' ) iter = self . parse_tuple ( with_condexpr = False , extra_end_rules = ( 'name:recursive' , ) ) test = None if self . stream . skip_if ( 'name:if' ) : test = self . parse_expression ( ) recursive = self . stream . skip_if ( 'name:recursive' ) body = self . parse_statements ( ( 'name:endfor' , 'name:else' ) ) if next ( self . stream ) . value == 'endfor' : else_ = [ ] else : else_ = self . parse_statements ( ( 'name:endfor' , ) , drop_needle = True ) return nodes . For ( target , iter , body , else_ , test , recursive , lineno = lineno )