Re: [sage-devel] Re: Exception with parameters

2015-11-12 Thread Jori Mäntysalo
On Thu, 12 Nov 2015, Volker Braun wrote: Just define your own exception class LatticeMeetException(ValueError):     def __init__(self, msg, x, y):         ... Tried something: http://trac.sagemath.org/ticket/19163 . May belong under "bad examples" -header on Python style book. -- Jori Mäntys

[sage-devel] Re: Exception with parameters

2015-11-12 Thread Volker Braun
Just define your own exception class LatticeMeetException(ValueError): def __init__(self, msg, x, y): ... The HasseDiagram.meet_matrix already raises if there is no bottom, no need to check that again at every step. On Thursday, November 12, 2015 at 5:48:51 AM UTC-8, Jori Mäntysal