Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77233

Re: When does True == True

Date 2014-08-28 15:52 -0500
From Andrew Berg <aberg010@my.hennepintech.edu>
Subject Re: When does True == True
References <hf4vv9d552irjamu61rtp1t4hut17c525u@4ax.com>
Newsgroups comp.lang.python
Message-ID <mailman.13579.1409259191.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2014.08.28 15:38, Seymore4Head wrote:
> What am I doing wrong?
>>> True == True
True
>>> True == "True"
False
>>> type(True)
<class 'bool'>
>>> type("True")
<class 'str'>

Also, if is already a boolean test, and it is more Pythonic to simply write "if
pigword.isalpha():".

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

When does True == True Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-28 16:38 -0400
  Re: When does True == True Andrew Berg <aberg010@my.hennepintech.edu> - 2014-08-28 15:52 -0500
    Re: When does True == True Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-28 16:53 -0400
  Re: When does True == True Joel Goldstick <joel.goldstick@gmail.com> - 2014-08-28 16:57 -0400

csiph-web