On Mon, Jul 2, 2012 at 4:54 AM, Jason Grout <[email protected]> wrote: > On 6/30/12 11:57 PM, Simon King wrote: >> >> [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().
That's a clever compromise, but > First, that is how it will work in the deprecation period. Secondly, for > the long term, my philosophical objection to that is that the "trace" > top-level function is then being used in *completely* different ways > depending on the input. In one, it's a mathematical construct. In the > other, it has absolutely nothing to do with the mathematics or structure of > the object, but instead is purely a low-level programming tool. +1 > This isn't > just philosophical, too. It would be extremely confusing for a new user who > accidentally passed in a string. I think it's much better to throw an error > (possibly mentioning trace_execution). As Robert says, a person really > wanting to trace the code probably will have no problem finding > trace_execution (indeed, probably won't even use trace_execution, as they > can use the preparser and pdb directly). > > Thanks, > > Jason > > > -- > 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 -- 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
