def _items(mappingorseq):
 if hasattr(mappingorseq, 'items'):
  return iteritems(mappingorseq)
 return mappingorseq

def _items ( mappingorseq ) : if hasattr ( mappingorseq , 'items' ) : return iteritems ( mappingorseq ) return mappingorseq
wrapper for efficient iteration over mappings represented by dicts or sequences:: .