[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: newbie question
From:       Tim Rowe <digitig () gmail ! com>
Date:       2013-06-25 19:26:26
Message-ID: CALWW4mrT0jTqeNi_VmdFEiKjU7T1Mgjt8uGqO-Z=swVAjpsHSg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 \
June 2013 03:49, Gene Heskett <span dir="ltr">&lt;<a href="mailto:gheskett@wdtv.com" \
target="_blank">gheskett@wdtv.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">On Saturday 22 June 2013 22:46:51 <a \
href="mailto:christhecomic@gmail.com">christhecomic@gmail.com</a> did opine:<br> <div \
class="im"><br> &gt; Writing simple program asking a question with the answer \
being<br> &gt; &quot;yes&quot;...how do I allow the correct answer if user types Yes, \
yes, or<br> &gt; YES?<br>
&gt;<br>
&gt; Thanks<br>
<br>
</div>AND each character coming in from the keyboard with $DF before adding it to<br>
the comparison buffer.  Makes it all uppercase.  Then compare it to the<br>
uppercase YES.<br>
<br>
Cheers, Gene<br></blockquote><div><br></div><div>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&#39;t even have to know for a task like this, let alone make \
unsafe assumptions about).</div> </div><div><br></div>-- <br>Tim Rowe
</div></div>



-- 
http://mail.python.org/mailman/listinfo/python-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic