On Thu, 12 Nov 2015, David Roe wrote:
Exactly that. Posets are, shortly said, a digraph with
integers as vertices and a dictionary mapping them to
elements. hasse_diagram.py might raise error if 7 and 13 has
no meet, and I want to see that elements 'c' and 'r' has no
meet.
Then Volker's suggestion of a custom exception class is probably what you
want. You can have x and y be attributes of the exception, which are
then accessible to the calling function.
OK. I will proceed to that direction.
Btw, should LatticePoset() return the empty lattice or Poset() give an
error? Graph() returns empty graph, but that's different because graphs
are mutable.
--
Jori Mäntysalo