def split_named_range(range_string):
 for range_string in SPLIT_NAMED_RANGE_RE.split(range_string)[1::2]:
  match = NAMED_RANGE_RE.match(range_string)
  if (match is None):
   raise NamedRangeException(('Invalid named range string: "%s"' % range_string))
  else:
   match = match.groupdict()
   sheet_name = (match['quoted'] or match['notquoted'])
   xlrange = match['range']
   sheet_name = sheet_name.replace("''", "'")
   (yield (sheet_name, xlrange))

def split_named_range ( range_string ) : for range_string in SPLIT_NAMED_RANGE_RE . split ( range_string ) [ 1 : : 2 ] : match = NAMED_RANGE_RE . match ( range_string ) if ( match is None ) : raise NamedRangeException ( ( 'Invalid named range string: "%s"' % range_string ) ) else : match = match . groupdict ( ) sheet_name = ( match [ 'quoted' ] or match [ 'notquoted' ] ) xlrange = match [ 'range' ] sheet_name = sheet_name . replace ( "''" , "'" ) ( yield ( sheet_name , xlrange ) )
separate a named range into its component parts .