Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Peter Otten <__peter__@web.de> Newsgroups: comp.lang.python Subject: Re: Syntax error (The Python Book) Linux User and Developer Bookazine Date: Sun, 14 Feb 2016 14:53:02 +0100 Organization: None Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de ugwV67njKwJDlCWjvrHLcA0NqH6P/xqAZRTmVpEba7/A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Developer': 0.03; 'subject:Python': 0.05; 'false.': 0.07; 'complaining': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'subject:error': 0.11; 'syntax': 0.13; 'hint:': 0.16; 'parentheses': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'wrote:': 0.16; 'copied': 0.18; 'integer': 0.18; '31,': 0.22; 'demonstrate': 0.23; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'actual': 0.28; 'about.': 0.29; 'preceding': 0.29; 'code': 0.30; 'subject:) ': 0.32; 'false': 0.35; 'but': 0.36; 'lines': 0.36; 'skip:{ 10': 0.36; 'structures': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'subject:The': 0.61; 'here': 0.66 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: p57bd970e.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102917 Geoff Munn wrote: > Noob at the Python thing so here goes, > > I have copied a program to demonstrate control structures in Python but > get a syntax error at line 31, isint = False. Often the actual syntax error in your code is in one of the lines preceding the one that Python is complaining about. > new_int=raw_input("Please enter integer {0}:".format(count +1) > isint = False Hint: Do the parentheses match?