On Thu, 12 Nov 2015, Daniel Krenn wrote:

Solution: From hasse_diagram.py do not raise just "no meet for x=1 y=2"
but exception with value more complicated than a string.

Something else: why is there a need for "x=" and "y=" (do these names
mean anything in this context)? IMHO, "no meet for 1 and 2" seems to be
fine.

Yep, there is no meaning for x= y= -string. But that's another story.

Can you explain your motivation and a bit more about returning x and y
as well (together with a string already containing the representation
strings of x and y); e.g. in
 ValueError("No meet for x=%s y=%s"%(x,y), x, y)

It sounds stupid to first generate a string and then parse it, even if the string is very simple.

(Sidenote: Actually LatticePoset() could raise error giving FOUR elements, those that form "forbidden X" that makes a poset non-lattice.)

--
Jori Mäntysalo

Reply via email to