Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.100 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.00; 'caller': 0.07; '"if': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'oct': 0.16; 'subject: \n ': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'all,': 0.21; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(e.g.': 0.27; 'replace': 0.27; 'subject:size': 0.29; 'this.': 0.29; 'error': 0.30; 'could': 0.32; 'true.': 0.33; 'received:google.com': 0.34; 'skip:* 20': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'subject:with': 0.36; 'test': 0.36; 'bad': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'received:209.85.214': 0.39; 'from:no real name:2**0': 0.60; 'evaluate': 0.62; 'more': 0.63; 'decided': 0.65; 'natural': 0.65; 'goal': 0.74; 'received:209.85.214.184': 0.84; 'received:mail- ob0-f184.google.com': 0.84; 'subject:NOT': 0.84; 'subject:any': 0.84; 'prone': 0.91 Newsgroups: comp.lang.python Date: Wed, 17 Oct 2012 11:33:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.62.101.121; posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_ References: <748e561a-7e75-4b13-be6b-91831d3b59c4@googlegroups.com> <84d4571f-430a-4fb3-8e54-cf6769a2c76f@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 81.62.101.121 MIME-Version: 1.0 Subject: Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? From: wxjmfauth@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Python 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: , Message-ID: Lines: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350498820 news.xs4all.nl 6934 [2001:888:2000:d::a6]:48347 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31535 Le mercredi 17 octobre 2012 20:28:21 UTC+2, Ian a =E9crit=A0: > On Wed, Oct 17, 2012 at 12:17 PM, wrote: >=20 > > Not at all, I knew this. In this I decided to program like >=20 > > this. >=20 > > >=20 > > Do you get it? Yes/No or True/False >=20 >=20 >=20 > It's just bad style, because both 'yes' and 'no' evaluate true. >=20 >=20 >=20 > if HasDiacritics('=E9l=E9phant'): >=20 > print('Correct!') >=20 >=20 >=20 > if HasDiacritics('elephant'): >=20 > print('Error!') >=20 >=20 >=20 > Prints: >=20 >=20 >=20 > Correct! >=20 > Error! >=20 >=20 >=20 > You could replace the test with "if HasDiacritics('elephant') =3D=3D >=20 > 'yes':", but why force the caller to write that out when the former >=20 > 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