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


Groups > comp.lang.python > #49180

Re: newbie question

References <195f7100-c4bf-414d-a92f-5b8a70d896f7@googlegroups.com> <201306222249.33354.gheskett@wdtv.com>
Date 2013-06-25 20:26 +0100
Subject Re: newbie question
From Tim Rowe <digitig@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3843.1372188395.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.  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

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


Thread

newbie question christhecomic@gmail.com - 2013-06-22 19:39 -0700
  Re: newbie question Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-22 19:50 -0700
  Re: newbie question Chris Angelico <rosuav@gmail.com> - 2013-06-23 12:48 +1000
  Re: newbie question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-23 03:08 +0000
  Re: newbie question Gene Heskett <gheskett@wdtv.com> - 2013-06-22 22:49 -0400
  Re: newbie question Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-25 13:05 -0600
  Re: newbie question Tim Rowe <digitig@gmail.com> - 2013-06-25 20:26 +0100

csiph-web