Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '[0]': 0.07; 'referring': 0.07; 'subject:code': 0.07; 'python': 0.09; '"a"': 0.09; '(the': 0.15; '"del"': 0.16; '24,': 0.16; 'eckhardt': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'none"': 0.16; 'statement.': 0.16; 'tags.': 0.16; 'ticks': 0.16; 'wrote:': 0.17; 'integer': 0.17; 'creates': 0.18; 'written': 0.20; 'assignment': 0.22; 'closely': 0.22; "i'd": 0.22; "we'd": 0.24; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'implicitly': 0.29; 'piece': 0.29; 'received:209.85.213.174': 0.29; 'received:mail- yx0-f174.google.com': 0.29; 'points': 0.29; 'related': 0.30; 'code': 0.31; 'cases,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'anything': 0.36; 'subject:with': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'more': 0.63; 'else.': 0.65; 'jul': 0.65; 'subject:this': 0.84 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:to :content-type; bh=cKiVh1c8xqcEnXz96jBpQ5R117OExWvj3KWXmGmFK5U=; b=Xjal2o3ANAWi7seHdWrLBPlZnWPJNkxImnuOiVcdTM+mz/9TfnhNdmXwNmNPBFUF9M CLgKa92WdWI4qsexXiUIjYjNRVcH8wX44BSMLJL5O/xIYvQcBxMmuUAqzc0i1SPa+SYh PuEI+F7eTcY/pHRJbvrUbvcvb5ANvXdlSCobWikQyftJ/rBIiyvSI6lcTHKn4+jeUry3 /pbIVbK8j4eicH34UGnR245mI3aAq6DnC0bk9Y9R3wK/PONzC03+KHL+LhAvfjQgIYoX ITzbdVe4dDC2ZB5G4dCFBCeggR7VthRYqq4RaC6gTLGMMLUDh5PYB7sv9N2c0G2OwRoB okxA== MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 24 Jul 2012 18:24:57 +1000 Subject: Re: What's wrong with this code? 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.12 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343118300 news.xs4all.nl 6954 [2001:888:2000:d::a6]:57614 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25965 On Tue, Jul 24, 2012 at 5:47 PM, Ulrich Eckhardt wrote: > There is one model that has helped me much understanding how Python ticks > and that is the model of name tags. The code "a = 1" creates an integer with > value 1 and attaches a tag with "a" written on it using a small piece of > rope. A double strand of rope, I think. If it were one strand, we'd write "a - 1". :) > [0] Note that in almost all cases, when referring to a tag, Python > implicitly operates on the object attached to it. One case (the only one?) > where it doesn't is the "del" statement. I'd say that del is more closely related to assignment than anything else. You can go "a = None" to mark that a now points to nothing, or you can "del a" to de-rope a altogether. ChrisA