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


Groups > comp.lang.python > #78576

Re: Function passed as an argument returns none

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'pretend': 0.09; 'subject:Function': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; "python's": 0.19; 'thu,': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'print': 0.22; 'stick': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'please.': 0.31; 'return;': 0.31; 'received:google.com': 0.35; 'there': 0.35; 'two': 0.37; 'pm,': 0.38; 'bad': 0.39; 'different': 0.65; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Dy1trByTVf/VRCYBoXsKZi0xWF4j+8lj25QAUTPuw10=; b=KrLMSCQBrFNPlY/G1Zdc2OqsXtxcy/Kg6kCWAR9Q9wOPJpLoySrFQJAMRB7gFP7uUw 5B1yVJaiiPEwYEag0Bb8nKl17fuhHwJzZtsJ9Hm13FLl1WsMZF5tDT84yXKRx1WP6S7l tojqwvAcz29Sslnp6haZ9HrFojekbzSehwanjjy3O9OaZYlacw+xJ9iriM74SqANm6h1 IHZ3SjaBh2qCIElB3Ct92C3zJJymeZ7CxSqtuXrCLn0r2do9hC4RBHVHUEAl6QfXsu0l LuV66F7+TDlj3piFz82wIPqRsrIB82a3Hdn7uGY0b1+koewCqujQHiZ9d1K1GW8btm4H z/tw==
MIME-Version 1.0
X-Received by 10.42.92.129 with SMTP id t1mr1617376icm.59.1412222578329; Wed, 01 Oct 2014 21:02:58 -0700 (PDT)
In-Reply-To <6bf1fc74-e40f-41f0-88b9-e4543c731e69@googlegroups.com>
References <mailman.14532.1412203048.18130.python-list@python.org> <6bf1fc74-e40f-41f0-88b9-e4543c731e69@googlegroups.com>
Date Thu, 2 Oct 2014 14:02:58 +1000
Subject Re: Function passed as an argument returns none
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14538.1412222580.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412222580 news.xs4all.nl 2891 [2001:888:2000:d::a6]:36235
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3384
X-Received-Body-CRC 1247420743
Xref csiph.com comp.lang.python:78576

Show key headers only | View raw


On Thu, Oct 2, 2014 at 12:29 PM, Rustom Mody <rustompmody@gmail.com> wrote:
> So by now you know there are 2 kinds of return:
>
> So the morals in short:
>
> 1. Stick to the return that works -- python's return statement --
> and avoid the return that seems to work -- the print statement

Please. There are not two types of return; there are two completely
different things here. Don't pretend that print is a bad form of
return. It isn't.

ChrisA

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


Thread

Function passed as an argument returns none Shiva <shivaji_tn@yahoo.com> - 2014-10-01 22:37 +0000
  Re: Function passed as an argument returns none Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-02 00:23 +0000
  Re: Function passed as an argument returns none Rustom Mody <rustompmody@gmail.com> - 2014-10-01 19:29 -0700
    Re: Function passed as an argument returns none Chris Angelico <rosuav@gmail.com> - 2014-10-02 14:02 +1000
      Re: Function passed as an argument returns none Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-02 17:59 +1000
        Re: Function passed as an argument returns none cl@isbd.net - 2014-10-02 10:43 +0100
          Re: Function passed as an argument returns none Rustom Mody <rustompmody@gmail.com> - 2014-10-02 04:30 -0700
        Re: Function passed as an argument returns none Rustom Mody <rustompmody@gmail.com> - 2014-10-02 04:38 -0700
          Re: Function passed as an argument returns none Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-03 10:10 +1000
            Re: Function passed as an argument returns none Rustom Mody <rustompmody@gmail.com> - 2014-10-02 18:49 -0700
              Re: Function passed as an argument returns none Chris Angelico <rosuav@gmail.com> - 2014-10-03 12:08 +1000

csiph-web