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

References <mailman.14532.1412203048.18130.python-list@python.org> <6bf1fc74-e40f-41f0-88b9-e4543c731e69@googlegroups.com>
Date 2014-10-02 14:02 +1000
Subject Re: Function passed as an argument returns none
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14538.1412222580.18130.python-list@python.org> (permalink)

Show all headers | 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