Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #12668
| Date | 2011-09-02 15:56 -0400 |
|---|---|
| From | Sahil Tandon <sahil@FreeBSD.org> |
| Subject | Re: idiomatic analogue of Perl's: while (<>) { ... } |
| References | <20110901045650.GA3466@magic.hamla.org> <j3pp0q$6n4$1@dough.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.716.1314993413.27778.python-list@python.org> (permalink) |
Dennis Lee Bieber wrote: > On Thu, 1 Sep 2011 00:56:50 -0400, Sahil Tandon<sahil@FreeBSD.org> >> # process input, line-by-line, and print responses after parsing input >> while 1: >> rval = parse(raw_input()) >> if rval == None: > > There is only ONE "None" object so the preferred method is > > if rval is None: Understood; thanks for that enlightenment. > Note: I don't see any exit handler/condition... Indeed. I excluded such things in the interest of brevity, to focus the discussion on my question. :) -- Sahil Tandon <sahil@FreeBSD.org>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: idiomatic analogue of Perl's: while (<>) { ... } Sahil Tandon <sahil@FreeBSD.org> - 2011-09-02 15:56 -0400
csiph-web