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


Groups > comp.lang.python > #43812

Re: Novice Issue

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.045
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'problem:': 0.07; 'input,': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'subject:Issue': 0.19; 'thu,': 0.19; 'compare': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'membership': 0.31; 'requests': 0.31; 'another': 0.32; 'proceed': 0.33; 'test': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'basis.': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'first': 0.61; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=GnvvsGj8ihVprRXDBbcdXzkxY6RCMAuk81zkiTivhgA=; b=ajGIlzsuBpRvQP8L1Go3zWGcqzD/dudUdUUNRYYGMetn9KGOFqJ7cWKE+vdp7VxDYS e+nMBdIkv6ojo5+fqp4+LS4ADAZ1m8plOLeyxKesPhMpxndTjyIPDg4VkI7+uuk6oLQ2 9DQBs2Tj+RA7GVqiLrrrAkORIBCeVDLRDzJGAvcsBxFqgM5J932kzCyz7DBpiRrv314y m0crQ5RutjmRg2ijDAud+E4kvPMpnwHVOC52vY4kkPtWa6f3rRlJw/o9v+gnVkpzQl3T +K78zlfT9U0cOQ3mneUmavWIb5vlP/tJeYZ6qpCIsrwqhARkmbdMqI48E1NkF6TCM8ZQ DjbA==
MIME-Version 1.0
X-Received by 10.52.37.109 with SMTP id x13mr6544174vdj.10.1366275968953; Thu, 18 Apr 2013 02:06:08 -0700 (PDT)
In-Reply-To <loom.20130418T104914-522@post.gmane.org>
References <0fa050c1-3a00-4c17-9fa6-b79a22485c7a@googlegroups.com> <loom.20130418T104914-522@post.gmane.org>
Date Thu, 18 Apr 2013 19:06:08 +1000
Subject Re: Novice Issue
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.758.1366275971.3114.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366275971 news.xs4all.nl 2188 [2001:888:2000:d::a6]:52653
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43812

Show key headers only | View raw


On Thu, Apr 18, 2013 at 6:58 PM, Wolfgang Maier
<wolfgang.maier@biologie.uni-freiburg.de> wrote:
> There are two solutions for that:
> the obvious: while not (raw_input == "quit" or raw_input == "q")

That has another problem: Once that's changed to raw_input() so it
actually requests input, it will do so twice, compare the first line
against "quit" and the second against "q", and proceed on that basis.
The membership test raw_input() in ("quit","q") is going to be far
better.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-17 21:06 -0700
  Re: Novice Issue Chris Angelico <rosuav@gmail.com> - 2013-04-18 14:14 +1000
  Re: Novice Issue Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-04-18 08:58 +0000
  Re: Novice Issue Chris Angelico <rosuav@gmail.com> - 2013-04-18 19:06 +1000
  Re: Novice Issue Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 11:10 +0100
  Re: Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-18 05:18 -0700
    Re: Novice Issue Dave Angel <davea@davea.name> - 2013-04-18 08:29 -0400
  Re: Novice Issue Bradley Wright <bradley.wright.biz@gmail.com> - 2013-04-18 05:34 -0700
  Re: Novice Issue John Gordon <gordon@panix.com> - 2013-04-18 14:21 +0000

csiph-web