Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:error': 0.03; 'exec': 0.09; 'subject:command': 0.09; 'subject:method': 0.09; 'subject:How': 0.10; "wouldn't": 0.14; '......': 0.16; '2.7.3?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: \n ': 0.16; 'subject:class': 0.16; 'subject:object': 0.16; 'suggestion.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'command': 0.22; 'looks': 0.24; 'least': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'problem': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'received:209': 0.37; 'easiest': 0.38; 'to:addr:python-list': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'solve': 0.60; 'subject:? ': 0.60; 'name': 0.63; 'chance': 0.65; 'mar': 0.68; 'subject:Get': 0.68; 'commands.': 0.84; 'kyle': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=5+WDC5yt7pAJQwUQio7XzMyBmxTUN4v/5LmTIYx9uwI=; b=YcKAKrmrOdjVE90ZLMeV4aQl/KKU1Xwgn3thnoK3oqM9bS8C4fnIvNtoKMXu7Hyg9/ E5NBodvkbJ4TAmy3CId95/IiJuKXTikk309vvuzuJStHkulhGPGTC8JZ2XPjU9wYo2rv Y7ccVeACcDSYsf91fS3XnHwuQhw/GH6OTrHHMnAbwfdlnpowjMKig5aSgpvKue/Iu3Hx 7Zo9dAssrNAsKWMcZ+X8VzoCCG7SCFGcGWXpNz8dzS4zk6dfO1hiN/ApTlXNTrjgGFwA o2erzyodfobP2Ecp4W2AIUvuDpOfc8YARIjQBW7OGWmthyrXeXy14rUAI84Yotho/UNR i1FA== MIME-Version: 1.0 X-Received: by 10.52.88.197 with SMTP id bi5mr17283870vdb.58.1364323428771; Tue, 26 Mar 2013 11:43:48 -0700 (PDT) In-Reply-To: <27d47c3b-18d7-4ef0-b6fb-d99482c72bdd@googlegroups.com> References: <2461da1a-d7d8-465b-8c12-6dc78398ef79@googlegroups.com> <27d47c3b-18d7-4ef0-b6fb-d99482c72bdd@googlegroups.com> Date: Wed, 27 Mar 2013 05:43:48 +1100 Subject: Re: How to define "exec" method on a class object? Get syntax error due to built in command From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364323431 news.xs4all.nl 6842 [2001:888:2000:d::a6]:51094 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41939 On Wed, Mar 27, 2013 at 5:13 AM, Kyle wrote: > Thanks for the suggestion. Looks like we currently use 2.3.4. > > This still wouldn't solve the problem because now the user would need to call something like getattr(wbt, "exec")() instead of wbt.exec() like all the other commands. > > I think the easiest thing for me to do would be to just change the command name from exec to something else. ..... that's pretty ancient. Any chance you can upgrade at least to 2.7.3? ChrisA