brownplt / ZZZ-captain-teach

Set sail for Learning Island! Deprecated and no longer maintained
5 stars 1 forks source link

print() displays twice in Interactions Window #18

Open samuela opened 11 years ago

samuela commented 11 years ago

If you enter print(5 + 5) it outputs twice. I'm assuming this is because print() returns the value as well as printing it out but the repeat output is a little unexpected in the Interactions Window.

jpolitz commented 11 years ago

The only sane fix that jumps to my mind is to change print() to not return the value it has printed, and return nothing instead (which the REPL avoids printing). But @shriram has some good arguments for keeping print() working this way, at least for now.

I'm not going to address this right away, since I think the behavior is easily explicable and consistent with the rest of the REPL's semantics.