Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.roellig-ltd.de!open-news-network.org!cyclone02.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!npeersf04.am4!fx29.am4.POSTED!not-for-mail From: alister Subject: Re: A syntax question Newsgroups: comp.lang.python References: User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 31 Message-ID: NNTP-Posting-Host: 82.9.78.47 X-Complaints-To: http://netreport.virginmedia.com X-Trace: 1415618631 82.9.78.47 (Mon, 10 Nov 2014 11:23:51 UTC) NNTP-Posting-Date: Mon, 10 Nov 2014 11:23:51 UTC Organization: virginmedia.com Date: Mon, 10 Nov 2014 11:23:51 GMT X-Received-Body-CRC: 2640735041 X-Received-Bytes: 1472 Xref: csiph.com comp.lang.python:80458 On Mon, 10 Nov 2014 12:07:58 +0100, Mok-Kong Shen wrote: > I don't understand the following phenomenon. Could someone kindly > explain it? Thanks in advance. > > M. K. Shen > > ------------------------------------------------- > > count=5 > > def test(): > print(count) > if count==5: > count+=0 ### Error message if this line is active, otherwise ok. > print(count) > return > > test() My crystal ball is currently in for repair and is not expected back in the foreseeable future. What result are you getting that you don't understand & what do you expect? What is the error message you get? Post the full traceback -- The POP server is out of Coke