Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6013
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: and becomes or and or becomes and |
| Date | 2011-05-22 18:14 -0400 |
| References | <mailman.1925.1306092188.9059.python-list@python.org> <2708393.dWV9SEqChM@PointedEars.de> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1934.1306102466.9059.python-list@python.org> (permalink) |
On 5/22/2011 5:57 PM, Thomas 'PointedEars' Lahn wrote: > 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. or change a,b to 1,2 -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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