Hi! On 2012-06-30, Jason Grout <[email protected]> wrote: > [ ] Change the current trace() to trace_execution(), put in a > deprecation warning for trace() used in this manner (but still let it > function as it used to), and make trace(x) call x.trace() by default. > > [ ] Leave things alone and don't do anything.
I don't see the problem. As far as I understand, trace(x) in the sense of "trace execution of code" implies that x is a string (namely some code). If x is a string then it doesn't have a x.trace attribute. If it is not a string, then the trace(x) apparently can not be about execution of code, and thus the only reasonable interpretation of trace(x) is: "Call x.trace()". Hence, I suggest (and vote +1) for a third option: [X] Determine whether x is a string. If it is, then trace(x) traces execution of code. If it isn't, try to return x.trace(). Best regards, Simon -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
