nodes: 0, module; 1, function_definition; 2, function_name:rownumbers; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, expression_statement; 8, if_statement; 9, return_statement; 10, identifier:table; 11, None; 12, comment:"""Return a list containing the row numbers of this table.
  
          This method can be useful after a selection or a sort.
          It returns the row numbers of the rows in this table with respect
          to the given table. If no table is given, the original table is used.
  
          For example::
  
            t = table('W53.MS')
            t1 = t.selectrows([1,3,5,7,9])  # select a few rows
            t1.rownumbers(t)
            # [1 3 5 7 9]
            t2 = t1.selectrows([2,5])       # select rows from the selection
            t2.rownumbers(t1)
            # [2 5]                         # rownrs of t2 in table t1
            t2.rownumbers(t)
            # [3 9]                         # rownrs of t2 in t
            t2.rownumbers()
            # [3 9]
  
          The last statements show that the method returns the row numbers
          referring to the given table. Table t2 contains rows 2 and 5 in
          table t1, which are rows 3 and 9 in table t.
  
          """; 13, comparison_operator:table is None; 14, block; 15, call; 16, identifier:table; 17, None; 18, return_statement; 19, attribute; 20, argument_list; 21, call; 22, identifier:self; 23, identifier:_rownumbers; 24, identifier:table; 25, attribute; 26, argument_list; 27, identifier:self; 28, identifier:_rownumbers; 29, call; 30, identifier:Table; 31, argument_list
code: def rownumbers(self, table=None):
          """Return a list containing the row numbers of this table.
  
          This method can be useful after a selection or a sort.
          It returns the row numbers of the rows in this table with respect
          to the given table. If no table is given, the original table is used.
  
          For example::
  
            t = table('W53.MS')
            t1 = t.selectrows([1,3,5,7,9])  # select a few rows
            t1.rownumbers(t)
            # [1 3 5 7 9]
            t2 = t1.selectrows([2,5])       # select rows from the selection
            t2.rownumbers(t1)
            # [2 5]                         # rownrs of t2 in table t1
            t2.rownumbers(t)
            # [3 9]                         # rownrs of t2 in t
            t2.rownumbers()
            # [3 9]
  
          The last statements show that the method returns the row numbers
          referring to the given table. Table t2 contains rows 2 and 5 in
          table t1, which are rows 3 and 9 in table t.
  
          """
          if table is None:
              return self._rownumbers(Table())
          return self._rownumbers(table)