1 | | Implementation of a set (using the category framework) from a function that returns an iterator. Building a set directly from an iterator leads to the impossibility of pickling. |

| 1 | Implementation of a set (using the category framework) from a function that returns an iterator as in |

| 2 | {{{ |

| 3 | sage: from sage.sets.set_from_iterator import EnumeratedSetFromIterator |

| 4 | sage: E = EnumeratedSetFromIterator(graphs) |

| 5 | {Graph on 0 vertices, Graph on 1 vertex, Graph on 2 vertices, Graph on 2 vertices, Graph on 3 vertices, Graph on 3 vertices, ...} |

| 6 | }}} |

| 7 | Note that in order to be able to pickle, we do not build directly a set from an iterator. |