Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Script for finding words of any size that do NOT contain vowels withacute diacritic marks?

Reply
Thread Tools

Script for finding words of any size that do NOT contain vowels withacute diacritic marks?

 
 
wxjmfauth@gmail.com
Guest
Posts: n/a
 
      10-17-2012
Le mercredi 17 octobre 2012 20:28:21 UTC+2, Ian a écrit*:
> On Wed, Oct 17, 2012 at 12:17 PM, <(E-Mail Removed)> wrote:
>
> > Not at all, I knew this. In this I decided to program like

>
> > this.

>
> >

>
> > Do you get it? Yes/No or True/False

>
>
>
> It's just bad style, because both 'yes' and 'no' evaluate true.
>
>
>
> if HasDiacritics('éléphant'):
>
> print('Correct!')
>
>
>
> if HasDiacritics('elephant'):
>
> print('Error!')
>
>
>
> Prints:
>
>
>
> Correct!
>
> Error!
>
>
>
> You could replace the test with "if HasDiacritics('elephant') ==
>
> 'yes':", but why force the caller to write that out when the former
>
> test is more natural and less prone to error (e.g. typoing 'yes')?


I *know* all this. In my prev. msg, the goal was to emph. the
usage of *unicode.normalize()".

jmf
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
RCR: String#contain? and Array#contain? Roger Pack Ruby 3 09-28-2010 04:13 PM
Does string contain A, and if so, does a section of string contain B Jason Carlton Javascript 11 12-08-2009 06:07 PM
Problem with diacritic characters when exporting data to Excel ChrisN ASP .Net 0 09-19-2006 01:35 PM
Missing keyboard vowels!? John Smith Computer Support 7 11-28-2004 03:26 AM



Advertisments