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


Groups > comp.lang.python > #10273

Re: Pipe in the "return" statement

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <oliver@bestwalter.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:" ': 0.03; '25,': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'bitwise': 0.16; 'flags.': 0.16; 'or.': 0.16; 'x-mailer:apple mail (2.1084)': 0.16; 'cc:addr :python-list': 0.16; 'pm,': 0.16; '>>>': 0.16; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'collins': 0.23; 'cheers': 0.23; 'code': 0.24; 'cc:addr:python.org': 0.30; 'hi,': 0.31; 'does': 0.32; 'done': 0.33; 'actually': 0.33; 'example,': 0.35; 'numbers.': 0.35; 'supposed': 0.35; 'charset:us-ascii': 0.36; 'but': 0.37; 'subject:: ': 0.38; 'returning': 0.38; 'header:Mime-Version:1': 0.39; 'your': 0.60; 'header:Message-Id:1': 0.61; 'results': 0.62; 'here': 0.66; 'received:212.227.17': 0.67; 'gentle': 0.77
Subject Re: Pipe in the "return" statement
Mime-Version 1.0 (Apple Message framework v1084)
Content-Type text/plain; charset=us-ascii
From Oliver Bestwalter <oliver@bestwalter.de>
In-Reply-To <1c175da2-79f4-40ed-803f-217dc935df6c@m8g2000yqo.googlegroups.com>
Date Mon, 25 Jul 2011 16:35:06 +0200
Content-Transfer-Encoding quoted-printable
References <acaab166-32c1-43df-b1a4-e3b47c62be36@m10g2000yqd.googlegroups.com> <9954ddFkjuU10@mid.individual.net> <1c175da2-79f4-40ed-803f-217dc935df6c@m8g2000yqo.googlegroups.com>
To Archard Lias <archardlias@googlemail.com>
X-Mailer Apple Mail (2.1084)
X-Provags-ID V02:K0:yzfFjauoQfPPAzoo+3Rsa9xniMSyQDIcWWzYgDd8WU1 FZ1QdgQGSwhfs0U8fhCDWujhsM3Kh9AtPANq5SCykgsxLEAQX1 JDS1NEEItcIari/F6ghE1WM3RnnGn/0MmOcOms93ApQrGKkLuJ 0TcJFM65im3QP8erZtynV02sXXbPYWFPBbiIRLsCkae104ZadI e/NMedTCp3PFbQEbbJdvKYI0PgjYT5Aede9Lb+YgXI=
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1456.1311604515.1164.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1311604515 news.xs4all.nl 23973 [2001:888:2000:d::a6]:46143
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10273

Show key headers only | View raw


Hello Archard,

On 25.07.2011, at 16:16, Archard Lias wrote:

> On Jul 25, 2:03 pm, Ian Collins <ian-n...@hotmail.com> wrote:
>> On 07/26/11 12:00 AM, Archard Lias wrote:
>> 
>>> Hi,
>> 
>>> Still I dont get how I am supposed to understand the pipe and its task/
>>> idea/influece on control flow, of:
>>> return<statement>  |<statement>
>>> ??
>> 
>> It's simply a bitwise OR.
>> 
>> --
>> Ian Collins
> 
> Yes, but how does it get determined, which one actually gets returned?

You do a Bitwise OR with numbers. Your statements are both returning numbers and those are combined with a bitwise OR. Combining b0001 with b0010 results in 0011 for example, you can see this very often done in C Code to set and check flags. Here is a gentle introduction:

http://www.codeproject.com/KB/tips/Binary_Guide.aspxhttp://www.codeproject.com/KB/tips/Binary_Guide.aspx

Cheers
Oliver

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


Thread

Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 05:00 -0700
  Re: Pipe in the "return" statement Ian Collins <ian-news@hotmail.com> - 2011-07-26 00:03 +1200
    Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 07:16 -0700
      Re: Pipe in the "return" statement Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9af6@myhashismyemail.com> - 2011-07-25 10:31 -0400
        Re: Pipe in the "return" statement Ethan Furman <ethan@stoneleaf.us> - 2011-07-25 13:07 -0700
          Re: Pipe in the "return" statement Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-28 08:26 +0200
      Re: Pipe in the "return" statement Oliver Bestwalter <oliver@bestwalter.de> - 2011-07-25 16:35 +0200
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:05 -0700
      Re: Pipe in the "return" statement John Gordon <gordon@panix.com> - 2011-07-25 14:39 +0000
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:06 -0700
      Re: Pipe in the "return" statement gwowen <gwowen@gmail.com> - 2011-07-25 07:42 -0700
  Re: Pipe in the "return" statement Christian Heimes <lists@cheimes.de> - 2011-07-25 14:33 +0200
    Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:28 -0700
      Re: Pipe in the "return" statement Christian Heimes <lists@cheimes.de> - 2011-07-25 18:11 +0200
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 09:30 -0700
  Re: Pipe in the "return" statement TonyO <guinness.tony@gmail.com> - 2011-07-25 05:52 -0700
    Re: Pipe in the "return" statement gwowen <gwowen@gmail.com> - 2011-07-25 06:00 -0700
    Re: Pipe in the "return" statement red floyd <redfloyd@gmail.com> - 2011-07-25 14:04 -0700
      reading  zipfile; problem using raw buffer "Sells, Fred" <fred.sells@adventistcare.org> - 2011-07-26 08:42 -0400
        Re: reading  zipfile; problem using raw buffer Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9af6@myhashismyemail.com> - 2011-07-26 08:49 -0400
      Re: reading  zipfile; problem using raw buffer Peter Otten <__peter__@web.de> - 2011-07-26 15:04 +0200
      RE: reading  zipfile; problem using raw buffer "Sells, Fred" <fred.sells@adventistcare.org> - 2011-07-26 11:22 -0400

csiph-web