'Iterator: return graph edges'

def edges_iter(self, data=False, keys=False):

    for (src, entry) in self.edge.iteritems():
        for (dst, keys) in entry.iteritems():
            if (src > dst):
                continue
            for (k, attrs) in keys.iteritems():
                if data:
                    if keys:
                        (yield (src, dst, k, attrs))
                    else:
                        (yield (src, dst, attrs))
                elif keys:
                    (yield (src, dst, k))
                else:
                    (yield (src, dst))
