def filterElements(elements, type):
  ret = {}
  for element in elements:
    welement = util.ETWrap(element)
    if welement.ns('wp').post_type == type and \
      (welement.ns('wp').status == "publish" or \
      welement.ns('wp').status == "future"):
      ret[welement.ns('wp').post_date] = element
  ret = sorted(ret.items(), reverse=True)
  final = [i[1] for i in ret]
  return final
Selectables are formatted nicely.
dataset/ETHPy150Open DeanCutlet/filestack/wp.py/filterElements--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_util.py/DirtyReactorAggregateErrorTest.test_formatSelectables