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


Groups > comp.lang.python > #76868

Re: Simple question

From "ElChino" <elchino@cnn.cn>
Newsgroups comp.lang.python
Subject Re: Simple question
Date 2014-08-23 15:31 +0200
Organization A noiseless patient Spider
Message-ID <lta53d$5hl$1@dont-email.me> (permalink)
References <ca0167cc-49d3-4e58-9fc0-e80550ee2bcf@googlegroups.com>

Show all headers | View raw


<explodeandroid@gmail.com> wrote:

> Can some one explain why this happens:
> True, False = False, True
> print True, False
> False True

I assume the value of True and False can be falsified. Like the 'None'
object can be. So swapping their values and printing them is similar to:
  a = 0
  b = 1
  a, b = b, a
  print a, b

Except that True/False are initialised built-ins.

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


Thread

Simple question explodeandroid@gmail.com - 2014-08-23 06:10 -0700
  Re: Simple question Chris Angelico <rosuav@gmail.com> - 2014-08-23 23:19 +1000
  Re: Simple question Peter Otten <__peter__@web.de> - 2014-08-23 15:26 +0200
  Re: Simple question "ElChino" <elchino@cnn.cn> - 2014-08-23 15:31 +0200
  Re: Simple question John Ladasky <john_ladasky@sbcglobal.net> - 2014-08-23 22:55 -0700
    Re: Simple question Chris Angelico <rosuav@gmail.com> - 2014-08-24 16:22 +1000

csiph-web