def match():
     for key, value in map.items():
         if (not pattern_was_quoted): key = key.strip()
         if (unconditionally_case_insensitive): key = key.upper()
         if (wildcard.is_match(string=key,
                               pattern=pattern,
                               escape_char=wildcard_escape_char)):
             result.append(value)
 def match():
   for key,value in map.items():
     if (not pattern_was_quoted): key = key.strip()
     if (unconditionally_case_insensitive): key = key.upper()
     if (wildcard.is_match(
           string=key,
           pattern=pattern,
           escape_char=wildcard_escape_char)):
       result.append(value)
def _get_serial_range(sel_keyword, map, start, stop):
    from iotbx.pdb import utils_base_256_ordinal as o
    o_start = None
    o_stop = None
    if (start is not None and start.count(" ") != len(start)):
        o_start = o(start)
    if (stop is not None and stop.count(" ") != len(stop)):
        o_stop = o(stop)
    if (o_start is not None and o_stop is not None and o_start > o_stop):
        raise RuntimeError("range with first index > last index: %s %s:%s" %
                           (sel_keyword, start, stop))
    result = []
    for s, iselection in map.items():
        os = o(s)
        if (o_start is not None and os < o_start): continue
        if (o_stop is not None and os > o_stop): continue
        result.append(iselection)
    return result
def _get_serial_range(sel_keyword, map, start, stop):
  from iotbx.pdb import utils_base_256_ordinal as o
  o_start = None
  o_stop = None
  if (start is not None and start.count(" ") != len(start)):
    o_start = o(start)
  if (stop is not None and stop.count(" ") != len(stop)):
    o_stop = o(stop)
  if (    o_start is not None
      and o_stop is not None
      and o_start > o_stop):
    raise RuntimeError(
      "range with first index > last index: %s %s:%s" % (
        sel_keyword, start, stop))
  result = []
  for s,iselection in map.items():
    os = o(s)
    if (o_start is not None and os < o_start): continue
    if (o_stop  is not None and os > o_stop): continue
    result.append(iselection)
  return result