On Mon, Nov 25, 2013 at 1:31 AM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > I don't think the REPL handles return values inside loops any different > from how it handles them outside loops. The difference is that file.write > methods used to return None in Python 2, in Python 3 they return the > number of bytes written.
Oh! That would explain it, thanks for clarifying. So my justification was wrong, though the solutions (assign the return value to something, or run it in a script rather than the REPL) still apply. ChrisA -- https://mail.python.org/mailman/listinfo/python-list