Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'though:': 0.07; 'assuming': 0.09; 'posted': 0.15; 'calculator': 0.16; 'help?': 0.16; 'none.': 0.16; 'other,': 0.16; 'posted,': 0.16; 'subject:Problem': 0.16; 'wrote:': 0.18; 'result.': 0.19; 'feb': 0.22; 'previously': 0.22; 'print': 0.22; 'mon,': 0.24; '>': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'program,': 0.31; 'code': 0.31; 'prints': 0.31; 'run': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'returning': 0.36; 'similar': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39 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:to :content-type; bh=gK4FniG1gWSd8l+91loiuq/YdVe22PqrIvN1ElVl4CQ=; b=HmUa2WK6IK8QkhzLgn/schtuRGEsSexZ+taKI6ABZ9Q8eDNktXvXmmND2P5urnYKwe PHykbIDtCr2jUkckYd5QgWoL2vpfhsInB8ZBCqpzti1PKLkYTqIzxeTAlOTfHki47zCE PkMWV4ksD1kcu9yYv3iwrwIvRRE1eEEvkfNJZ5K93KEHS11eNqUmLswaeDiqwovpbdru m8HcRIwc+vafWEfo0HndvdXDx8ontHa9eCTnbhRfBbjm05cANwYDNdL+tV4GQQtp25cF k7tmvR/omzUOUNSq/osZwrvXWQ39JJUboH8UtTNsvRgtfrUAC7OI/KoqArIzYgmUyA0h uwlg== MIME-Version: 1.0 X-Received: by 10.66.221.103 with SMTP id qd7mr39676725pac.44.1391469025042; Mon, 03 Feb 2014 15:10:25 -0800 (PST) In-Reply-To: <52f0173a$0$29972$c3e8da3$5496439d@news.astraweb.com> References: <608a3384-525b-4879-82d2-5a6414827fa7@googlegroups.com> <61630cc4-a9fe-4936-a86e-65c891224a63@googlegroups.com> <52f0173a$0$29972$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 3 Feb 2014 16:10:24 -0700 Subject: Re: Calculator Problem From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=047d7b5dbaa2f429a904f188a01d 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: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391469028 news.xs4all.nl 2857 [2001:888:2000:d::a6]:55920 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65388 --047d7b5dbaa2f429a904f188a01d Content-Type: text/plain; charset=ISO-8859-1 On Feb 3, 2014 3:26 PM, "Steven D'Aprano" < steve+comp.lang.python@pearwood.info> wrote: > > On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote: > > > excuse me but don't be so ******* rude , i did run this program and it > > did run correctly > > Charlie, you may have run *some* program, but it wasn't the program you > posted here. And if it ran correctly, why are you asking for help? He said previously that he doesn't want it printing the None after the result. I think that was already answered though: Assuming that the code being run is structurally similar to what was posted, it prints None because the calculator functions print their result instead of returning it, and then the main function also prints the return value from the calculator functions, which is None. The print should be in one place or the other, not both. --047d7b5dbaa2f429a904f188a01d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Feb 3, 2014 3:26 PM, "Steven D'Aprano" <steve+comp.lang.python@pearwood.= info> wrote:
>
> On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote:
>
> > excuse me but don't be so ******* rude , i did run this progr= am and it
> > did run correctly
>
> Charlie, you may have run *some* program, but it wasn't the progra= m you
> posted here. And if it ran correctly, why are you asking for help?

He said previously that he doesn't want it printing the = None after the result. I think that was already answered though: Assuming t= hat the code being run is structurally similar to what was posted, it print= s None because the calculator functions print their result instead of retur= ning it, and then the main function also prints the return value from the c= alculator functions, which is None. The print should be in one place or the= other, not both.

--047d7b5dbaa2f429a904f188a01d--