From: Josh Cheek Date: 2013-01-08T23:34:34+09:00 Subject: Re: How to identify whether a line of code will return? --f46d0401fe7d069e3704d2c7d893 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jan 8, 2013 at 2:41 AM, Robert Klemme wrote: > On Tue, Jan 8, 2013 at 4:46 AM, Josh Cheek 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 --f46d0401fe7d069e3704d2c7d893 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jan 8, 2013 at 2:41 AM, Robert Klemme <shortcutter@google= mail.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,<= br> > because I want to modify it to capture it's return value. If it re= turns,
> this results in a syntax error:

Why do you need to modify the line? =A0Can't you catch it at the = calling
site or by decorating the method?


Because the library I'm writing (<= a href=3D"https://github.com/JoshCheek/seeing_is_believing">https://github.= com/JoshCheek/seeing_is_believing)=A0records 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 wh= en executed so that I don't try to record it.

-Josh
--f46d0401fe7d069e3704d2c7d893--