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: 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: <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 Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Thu, Oct 2, 2014 at 12:29 PM, Rustom Mody 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