Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31535
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-10-17 11:33 -0700 |
| References | (1 earlier) <mailman.2350.1350486045.27098.python-list@python.org> <748e561a-7e75-4b13-be6b-91831d3b59c4@googlegroups.com> <mailman.2354.1350493663.27098.python-list@python.org> <84d4571f-430a-4fb3-8e54-cf6769a2c76f@googlegroups.com> <mailman.2360.1350498464.27098.python-list@python.org> |
| Subject | Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? |
| From | wxjmfauth@gmail.com |
| Message-ID | <mailman.2361.1350498820.27098.python-list@python.org> (permalink) |
Le mercredi 17 octobre 2012 20:28:21 UTC+2, Ian a écrit :
> On Wed, Oct 17, 2012 at 12:17 PM, <wxjmfauth@gmail.com> 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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Script for finding words of any size that do NOT contain vowels with acute diacritic marks? nwaits <nowaits@gmail.com> - 2012-10-17 07:31 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? Dave Angel <d@davea.name> - 2012-10-17 11:00 -0400
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 08:32 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-17 11:07 -0600
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 11:17 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? Chris Angelico <rosuav@gmail.com> - 2012-10-18 05:22 +1100
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-17 12:27 -0600
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 11:33 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 11:33 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 11:17 -0700
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? David Robinow <drobinow@gmail.com> - 2012-10-17 13:16 -0400
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-17 23:18 +0000
Re: Script for finding words of any size that do NOT contain vowels with acute diacritic marks? wxjmfauth@gmail.com - 2012-10-17 08:32 -0700
csiph-web