Could I escape through saying that the functionality is not implemented "in the running version of Sage" ? :-p
Nathann On 16 June 2010 16:19, daveloeffler <dave.loeff...@gmail.com> wrote: > > > On Jun 16, 1:31 pm, Nathann Cohen <nathann.co...@gmail.com> wrote: > >> What would you think of raising a NotImplementedError when there is no >> solver installed instead ? > > NotImplementedError is misleading: the functionality is implemented, > it just isn't installed :-) > > The most "pythonic" solution is probably to add a new exception class > "OptionalPackageNotInstalledError", probably deriving from the Python > library's EnvironmentError. Python exceptions are class instances and > can be subclassed in the normal way. This is very easy to do; compare > sage/structure/coerce_exceptions.py, whose entire code is > > class CoercionException(TypeError): > """ > [docstring] > """ > pass > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org