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


Groups > comp.lang.python > #76868

Re: Simple question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From "ElChino" <elchino@cnn.cn>
Newsgroups comp.lang.python
Subject Re: Simple question
Date Sat, 23 Aug 2014 15:31:13 +0200
Organization A noiseless patient Spider
Lines 17
Message-ID <lta53d$5hl$1@dont-email.me> (permalink)
References <ca0167cc-49d3-4e58-9fc0-e80550ee2bcf@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
Injection-Date Sat, 23 Aug 2014 13:31:26 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="d062f3387c933d253a82f4b2c1441550"; logging-data="5685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++zH2CjwXhODBElNedQVpf"
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
Cancel-Lock sha1:6IiB/J7Sz7XRm64cYbwuHU+KJEc=
X-Priority 3
X-MSMail-Priority Normal
Xref csiph.com comp.lang.python:76868

Show key headers only | 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