Nick Alexander wrote: >> if msg = "negative number cannot be raised to a fractional power" : >> print "In Sage, even odd fractional powers of negative numbers yield >> complex roots" > > I am opposed to printing anything from the Sage library, because I > don't want to have to interact with it in any way, including ignoring > output. Raising an error does not make sense here. If this is > really seen as a win, I suggest it be made part of a "new user's > mode" that is off by default. >
The current functionality (before the patch) was to print out a warning if errors occurred during evaluation. What do other people think about changing the verbose output to a "user-friendly hand-holding" option? For reference, Mathematica has a messaging framework that lets textual messages to be associated with symbols and have optional arguments. Then when you want to print a message, you call Message[symbol::message_name, optional_arg_1, optional_arg_2, etc.]. You can run a command using the Quiet command (Quiet[SomeCommand[]]) which turns off messages, and you can turn a message on or off permanently by calling Off[symbol::message_name] or On[symbol::message_name]. Messages that are output are saved and can be recalled later. If more than three messages are printed out during a command, then a special message is printed and further messages are suppressed. One nice thing about all messages going through the Message command is that the correct language is automatically printed out (provided a message has been translated). It is also easy to redirect messages to different output since all messages go through a single function. I suppose if we wanted to do a similar framework in Sage, we could have a message class hierarchy (i.e., GenericMessage -> TipMessage or WarningMessage, etc., and each of these could be turned on or off or redirected as the user desired). That would probably be more flexible than an on-off global switch. Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---