On Mon, Feb 9, 2009 at 10:28 AM, Florent Hivert <[email protected]> wrote: > > Hi, > >> ValueError derives from ArithmeticError, so if anybody wrote >> >> try: something... >> except ArithmeticError: >> .. >> >> and you change the ArithmeticError to ValueError, then their code will >> still work fine. >> So I think the impact of making this change isn't too bad. > > Great !!! Sorry I'm too new to python/sage to even realize that this can be > possible... > > Err ??? Actually, are you sure ? Does the following not tells the contrary ? > > sage: ArithmeticError.mro() > > [<type 'exceptions.ArithmeticError'>, > <type 'exceptions.StandardError'>, > <type 'exceptions.Exception'>, > <type 'exceptions.BaseException'>, > <type 'object'>] > sage: ValueError.mro() > > [<type 'exceptions.ValueError'>, > <type 'exceptions.StandardError'>, > <type 'exceptions.Exception'>, > <type 'exceptions.BaseException'>, > <type 'object'>] > > Cheers, > > Florent >
Crap, you're right. It's not the case the ValueError derives from ArithmeticError. Thus, I now change my mind, and think you should *definitely* stick with ArithmeticError, for backwards compatibility, etc. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
