On Thu, Nov 12, 2015 at 9:34 AM, Daniel Krenn <kr...@aon.at> wrote:

> On 2015-11-12 08:45, Jori Mäntysalo wrote:
> > LatticePoset({'a':['b', 'c'], 'b':['d', 'e'], 'c':['d', 'e'],
> > 'd':['f'], 'e':['f']})
> >
> > returns "ValueError: Not a lattice." I would like to see for example
> > "Not a lattice: no meet for e and d."
>
> +1
>
> > 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.
>
> > Question: Will this break something? I.e. can "internal" classes raise
> > these kind of exceptions?
> >
> > Example implementation: http://trac.sagemath.org/ticket/19163 . NOT in
> > needs_review yet.
>
> 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)
>

Sounds good.  Also check out sage.misc.lazy_string if the string
representations of x and y could be complicated.
David

>
> Best
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to