Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'argument': 0.05; 'subject:Python': 0.06; 'already.': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'redundant': 0.16; 'subject: \n ': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'pointed': 0.19; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'fine': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; '15,': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; '3.x': 0.31; 'block,': 0.31; 'subject:that': 0.31; 'subject:with': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; 'simply': 0.61; 'here': 0.66; 'ending': 0.78; 'subject:made': 0.84; 'to:none': 0.92 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:cc :content-type; bh=xRA6Nv2P8QLiJXtUe3Rt3vjveYe/xJD58hWNREnpY8k=; b=VK56Y7p2uc2I9uNoTeRfyGX46X+n638iIrEJgJNXxSwWVz6Uxay3muJD8FezZKrRCk C8T8qCgY3+I2It+PRbY3NMfdG+Igtd0YtYLw4KFSNgoUAsozVqg4AdUant3X6dc1Qtaz bQoHnHC2U/2jjOdP6OgYA4neAQMA/WisZI7C66Qauu4FWRRRvl8HcqtKQ48G1NnbzcX9 64TvNmtQqF2/vk4A/8q0+WAWoH952G62wDo8JVOkMBIynWAPgOmbku8RucDfr++TYfD6 oHQlYg0CXpbnq5uqyfo2g4zxUOqk1U4onvnhJrKgtwGZpIbnilAaE0bR8iTKrAcFEQ0/ Gclw== MIME-Version: 1.0 X-Received: by 10.107.134.39 with SMTP id i39mr26200008iod.53.1418611330807; Sun, 14 Dec 2014 18:42:10 -0800 (PST) In-Reply-To: <548e4837$0$13012$c3e8da3$5496439d@news.astraweb.com> References: <01937423-e700-4825-a502-568dcb2d5324@googlegroups.com> <41c32aed-315a-43df-9dc6-380d0ecc3425@googlegroups.com> <548e4837$0$13012$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 15 Dec 2014 13:42:10 +1100 Subject: Re: Python console rejects an object reference, having made an object with that reference as its name in previous line From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418611339 news.xs4all.nl 2892 [2001:888:2000:d::a6]:46381 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:82542 On Mon, Dec 15, 2014 at 1:32 PM, Chris Roy-Smith wrote: > and here he uses a python 3.x print syntax which triggers the following > error message On the contrary; parens around a single argument will work just fine in Py2 (they're simply redundant parentheses, in the same way that you can write "i = (1)" and it's the same as "i = 1"). The syntax error comes from unindenting without ending the block, as several have pointed out already. ChrisA