Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'high-level': 0.09; 'subject:question': 0.10; 'language.': 0.14; 'assumptions': 0.16; 'buffer.': 0.16; 'unsafe': 0.16; 'uppercase': 0.16; 'wrote:': 0.18; 'library': 0.18; 'to:name:python-list@python.org': 0.22; 'keyboard': 0.24; "shouldn't": 0.24; 'cheers,': 0.24; 'question': 0.24; '>': 0.26; 'compare': 0.26; 'task': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'character': 0.29; 'tim': 0.29; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; 'back!': 0.31; 'comparison': 0.31; 'yes.': 0.31; 'alone': 0.33; 'received:google.com': 0.35; 'functions.': 0.36; 'thanks': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'even': 0.60; 'simple': 0.61; 'email addr:gmail.com': 0.63; 'account': 0.65; 'saturday': 0.68; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dxcuvBB4CN9hZJcheXG6CO43xaryPEANQMNDTP71kwc=; b=uWKa0Sztlgn7AZy5+b6gO0m22HmvoG3gY0r9pHV0FVKR7LpduThs60dfRUOXAe8VGx OF89Vfn3PvVTx49YppT0xpAQpAsr0mctkdUEj3yttR03tQRMKgNNJTvNHAXIF0dVjl/2 Ht1HZYlVkRR9gVwrJR0RgsAJYuIchpICW6yxX9yfnF2DmIO7gd4Whw7VbL7XGUFGRQ5s bT6VL72qd9rVtClsOB7MH9Zw7qTRZ5h2DQcJ38LnGEVjQJ9i1izPZqAor74Ha/k0OsSC WJljtSonGxA+tpC2dOz9gyD92NiTbr/ygLWFT4XmmE+NBy3EXh7mPsANCOq+6/obtDDc Zk/g== MIME-Version: 1.0 X-Received: by 10.58.46.48 with SMTP id s16mr297518vem.52.1372188386115; Tue, 25 Jun 2013 12:26:26 -0700 (PDT) In-Reply-To: <201306222249.33354.gheskett@wdtv.com> References: <195f7100-c4bf-414d-a92f-5b8a70d896f7@googlegroups.com> <201306222249.33354.gheskett@wdtv.com> Date: Tue, 25 Jun 2013 20:26:26 +0100 Subject: Re: newbie question From: Tim Rowe To: "python-list@python.org" Content-Type: multipart/alternative; boundary=089e012945b051c9c004dfff8180 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372188395 news.xs4all.nl 15923 [2001:888:2000:d::a6]:35726 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49180 --089e012945b051c9c004dfff8180 Content-Type: text/plain; charset=ISO-8859-1 On 23 June 2013 03:49, Gene Heskett wrote: > On Saturday 22 June 2013 22:46:51 christhecomic@gmail.com did opine: > > > Writing simple program asking a question with the answer being > > "yes"...how do I allow the correct answer if user types Yes, yes, or > > YES? > > > > Thanks > > AND each character coming in from the keyboard with $DF before adding it to > the comparison buffer. Makes it all uppercase. Then compare it to the > uppercase YES. > > Cheers, Gene > Hello, the 1970s called and want their hairstyles back! That is *terrible* practice in a modern high-level language. Use the library functions. They will take proper account of the character set being used (which you shouldn't even have to know for a task like this, let alone make unsafe assumptions about). -- Tim Rowe --089e012945b051c9c004dfff8180 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On 23 June 2013 03:49, Gene Heskett <gheskett@wdtv.com> wrote:
On Saturday 22 June 2013 22:46:51 christhecomic@gmail.com did opine:

> Writing simple program asking a question with the answer being
> "yes"...how do I allow the correct answer if user types Yes,= yes, or
> YES?
>
> Thanks

AND each character coming in from the keyboard with $DF before adding= it to
the comparison buffer. =A0Makes it all uppercase. =A0Then compare it to the=
uppercase YES.

Cheers, Gene

Hello, the 1970s called an= d want their hairstyles back! That is *terrible* practice in a modern high-= level language. Use the library functions. They will take proper account of= the character set being used (which you shouldn't even have to know fo= r a task like this, let alone make unsafe assumptions about).

--
Tim Rowe
--089e012945b051c9c004dfff8180--