Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'attribute': 0.05; 'override': 0.07; 'variables.': 0.07; 'subject:position': 0.09; 'oct': 0.16; 'received:mail-wi0-f178.google.com': 0.16; 'suggested,': 0.16; 'variable.': 0.16; 'wrote:': 0.17; 'basically': 0.17; 'thu,': 0.17; 'assignment': 0.22; 'kevin': 0.23; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; "i'm": 0.29; 'asking': 0.32; '11,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=eZiHn0w1V5G1A+qpAQbJ/xQUgws7paxdOp1WVM7kX6E=; b=aYYayu7pCJ8h+3gaEd/n7ZSXVt+w23icsvDkyRF2jSau/ixHC5Yf9pXUj39PM0KCoj s4gYY4rCBf1sg+jPo5BkhzVviiqeF/DIFnhq/jii+5L99NuZxd9Rp8+HI1D12AxZKgFV WPKDuA19GoiqA9o02S1cCWaL49Ag4+bBIioCF9MfqiALxZ8UJtyfPJRntrcEFDeuxomO 7QnDvug2KR5kg9G4sv76LZ0KqUqAWKtsDep9cZVRzpA4Y+5VFDDjnqRxfzgRSXyznAWw GwAGRfw4QVnm0L9nhF6VkuNpEhemsHtKh0cjRrTlpAXSkkgprpxRatwyLhlQ5pA4qn/Y +lRw== MIME-Version: 1.0 In-Reply-To: References: <50773AE5.7020400@davea.name> From: Ian Kelly Date: Thu, 11 Oct 2012 16:43:21 -0600 Subject: Re: __setitem__ without position To: Python 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: 1349995434 news.xs4all.nl 6932 [2001:888:2000:d::a6]:35191 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31137 On Thu, Oct 11, 2012 at 4:13 PM, Kevin Anthony wrote: > I'm not supprised... and understand why it's happening. I'm asking how to > get around it. > > Basically i'm asking how to override, if i can, the `=` You cannot override assignment of local variables. To get around it, use slicing as Dave suggested, or use an attribute instead of a local variable.