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


Groups > comp.lang.python > #6011

Re: and becomes or and or becomes and

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.84.MISMATCH!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
Message-Id <2708393.dWV9SEqChM@PointedEars.de>
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Organization PointedEars Software (PES)
Date Sun, 22 May 2011 23:57:11 +0200
User-Agent KNode/4.4.7
Content-Transfer-Encoding 7Bit
Subject Re: and becomes or and or becomes and
Newsgroups comp.lang.python
References <mailman.1925.1306092188.9059.python-list@python.org>
Followup-To comp.lang.python
MIME-Version 1.0
Lines 22
NNTP-Posting-Date 22 May 2011 23:57:11 CEST
NNTP-Posting-Host de6a6885.newsspool2.arcor-online.net
X-Trace DXC=]oG=]ZAO;bnPXlQ;h]GTMdA9EHlD;3Ycb4Fo<]lROoRa8kF<OcfhCOkRLRX_FVNK>nDZm8W4\YJNlT<8F<]0D<`i[0A>JV]oL2c2fnoM10NXcd
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6011

Followups directed to: comp.lang.python

Show key headers only | View raw


Stef Mientki wrote:

> must of us will not use single bits these days,
> but at first sight, this looks funny :
> 
>>>> a=2
>>>> b=6
>>>> a and b
> 6
>>>> a & b
> 2
>>>> a or b
> 2
>>>> a | b
> 6

Change the order of the operands and see what happens.

-- 
PointedEars

Bitte keine Kopien per E-Mail. / Please do not Cc: me.

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


Thread

and becomes or and or becomes and Stef Mientki <stef.mientki@gmail.com> - 2011-05-22 21:23 +0200
  Re: and becomes or and or becomes and Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-22 23:57 +0200
    Re: and becomes or and or becomes and Terry Reedy <tjreedy@udel.edu> - 2011-05-22 18:14 -0400
  Re: and becomes or and or becomes and Tim Roberts <timr@probo.com> - 2011-05-22 15:39 -0700
    Re: and becomes or and or becomes and Chris Angelico <rosuav@gmail.com> - 2011-05-23 09:28 +1000
    Re: and becomes or and or becomes and Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-23 00:30 +0000
      Re: and becomes or and or becomes and rusi <rustompmody@gmail.com> - 2011-05-23 08:30 -0700
        Re: and becomes or and or becomes and bch <bch.itbgcthate@gmail.com> - 2011-05-28 05:27 -0700
          Re: and becomes or and or becomes and Chris Angelico <rosuav@gmail.com> - 2011-05-28 22:50 +1000
    Re: and becomes or and or becomes and Nobody <nobody@nowhere.com> - 2011-05-28 14:31 +0100
      Re: and becomes or and or becomes and Chris Angelico <rosuav@gmail.com> - 2011-05-29 00:04 +1000

csiph-web