On Wed, Oct 17, 2012 at 12:17 PM, <wxjmfa...@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')? -- http://mail.python.org/mailman/listinfo/python-list