Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12668 > unrolled thread

Re: idiomatic analogue of Perl's: while (<>) { ... }

Started bySahil Tandon <sahil@FreeBSD.org>
First post2011-09-02 15:56 -0400
Last post2011-09-02 15:56 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: idiomatic analogue of Perl's: while (<>) { ... } Sahil Tandon <sahil@FreeBSD.org> - 2011-09-02 15:56 -0400

#12668 — Re: idiomatic analogue of Perl's: while (<>) { ... }

FromSahil Tandon <sahil@FreeBSD.org>
Date2011-09-02 15:56 -0400
SubjectRe: idiomatic analogue of Perl's: while (<>) { ... }
Message-ID<mailman.716.1314993413.27778.python-list@python.org>
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>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web