Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'tries': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'bug': 0.12; 'language.': 0.14; ':-(': 0.16; 'be:': 0.16; 'picks': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Java': 0.16; 'used:': 0.16; 'language': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'programming': 0.22; 'header:User-Agent:1': 0.23; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'correct': 0.29; 'code': 0.31; 'up.': 0.33; "i'd": 0.34; 'could': 0.34; 'problem.': 0.35; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'configured': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'dangerous': 0.60; 'introduced': 0.61; 'our': 0.64; 'charset:windows-1252': 0.65; 'subject:experience': 0.84; 'careful': 0.91; 'on?': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Bitten by my C/Java experience Date: Mon, 04 May 2015 18:59:17 +0100 References: <87r3qwid3u.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-24-223-224.ppp.as43234.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <87r3qwid3u.fsf@Equus.decebal.nl> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430762377 news.xs4all.nl 2887 [2001:888:2000:d::a6]:47371 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89922 On 04/05/2015 16:20, Cecil Westerhof wrote: > Potential dangerous bug introduced by programming in Python as if it > was C/Java. :-( > I used: > ++tries > that has to be: > tries += 1 > > Are there other things I have to be careful on? That does not work as > in C/Java, but is correct syntax. > Not dangerous at all, your test code picks it up. I'd also guess, but don't actually know, that one of the various linter tools could be configured to find this problem. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence