Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60379
| References | <l6qacb$ap$1@ger.gmane.org> <mailman.3084.1385216188.18130.python-list@python.org> <52920dd3$0$29993$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2013-11-25 01:39 +1100 |
| Subject | Re: sys.stdout and Python3 |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3137.1385303985.18130.python-list@python.org> (permalink) |
On Mon, Nov 25, 2013 at 1:31 AM, Steven D'Aprano <steve+comp.lang.python@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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: sys.stdout and Python3 Chris Angelico <rosuav@gmail.com> - 2013-11-24 01:16 +1100
Re: sys.stdout and Python3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-24 14:31 +0000
Re: sys.stdout and Python3 Chris Angelico <rosuav@gmail.com> - 2013-11-25 01:39 +1100
csiph-web