##
8.9 #return

The template:

      1
      $test[1]
      3
      #def test
      1.5
      #if 1
      #return '123'
      #else
      99999
      #end if
      #end def

The output:

      1
      2
      3

The generated code:

          def test(self,
                  trans=None,
                  dummyTrans=False,
                  VFS=valueFromSearchList,
                  VFN=valueForName,
                  getmtime=getmtime,
                  currentTime=time.time):

              """
              Generated from #def test at line 5, col 1.
              """

              if not trans:
                  trans = DummyTransaction()
                  dummyTrans = True
              write = trans.response().write
              SL = self._searchList
              filter = self._currentFilter
              globalSetVars = self._globalSetVars

              ########################################
              ## START - generated method body

              write('1.5\n')
              if 1:
                  return '123'
              else:
                  write('99999\n')

              ########################################
              ## END - generated method body

              if dummyTrans:
                  return trans.response().getvalue()
              else:
                  return ""

          def respond(self,
                  trans=None,
                  dummyTrans=False,
                  VFS=valueFromSearchList,
                  VFN=valueForName,
                  getmtime=getmtime,
                  currentTime=time.time):

              """
              This is the main method generated by Cheetah
              """

              if not trans:
                  trans = DummyTransaction()
                  dummyTrans = True
              write = trans.response().write
              SL = self._searchList
              filter = self._currentFilter
              globalSetVars = self._globalSetVars

              ########################################
              ## START - generated method body

              write('\n1\n')
              write(filter(VFS(SL,"test",1)[1])) # generated from '$test[1]' at line 3, col 1.
              write('\n3\n')

              ########################################
              ## END - generated method body

              if dummyTrans:
                  return trans.response().getvalue()
              else:
                  return ""