On Tue, Jan 8, 2013 at 2:41 AM, Robert Klemme <shortcutter / googlemail.com>wrote:

> On Tue, Jan 8, 2013 at 4:46 AM, Josh Cheek <josh.cheek / gmail.com> wrote:
> > Hi, I want to be able to identify whether a line of code will return,
> > because I want to modify it to capture it's return value. If it returns,
> > this results in a syntax error:
>
> Why do you need to modify the line?  Can't you catch it at the calling
> site or by decorating the method?
>
>
Because the library I'm writing (
https://github.com/JoshCheek/seeing_is_believing) records the result of
every line. The plan is to use it in an editor so that every time the file
is saved, it displays the results of the lines next to them.

I don't need to record the return statement, though, that seems too
difficult to me. I just need to identify that it will blow up when executed
so that I don't try to record it.

-Josh