def _by_srid(things, srs=True):
 ret = {}
 for thing in tup(things):
  if (getattr(thing, 'sr_id', None) is not None):
   ret.setdefault(thing.sr_id, []).append(thing)
 if srs:
  _srs = (Subreddit._byID(ret.keys(), return_dict=True) if ret else {})
  return (ret, _srs)
 else:
  return ret

def _by_srid ( things , srs = True ) : ret = { } for thing in tup ( things ) : if ( getattr ( thing , 'sr_id' , None ) is not None ) : ret . setdefault ( thing . sr_id , [ ] ) . append ( thing ) if srs : _srs = ( Subreddit . _byID ( ret . keys ( ) , return_dict = True ) if ret else { } ) return ( ret , _srs ) else : return ret
takes a list of things and returns them in a dict separated by sr_id .