Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'year?': 0.09; 'cc:addr :python-list': 0.11; "'rb')": 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'shallow': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'variable': 0.18; 'wed,': 0.18; 'alex': 0.19; 'cc:addr:python.org': 0.22; 'skip': 0.24; 'cc:2**0': 0.24; 'van': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'reader': 0.33; 'received:google.com': 0.35; 'subject:?': 0.36; 'skip:o 20': 0.38; 'skip:[ 10': 0.38; 'expect': 0.39; '12,': 0.39; 'subject:. ': 0.67; 'mar': 0.68; 'copies.': 0.68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=GBZW5VRIcMRmDLfkk8Z1/BIbhdtfeQQXndirM51rMtM=; b=pvnA242pZNXknGUHAU2ZPaO9fygTFQ5yT8n21x/XopVVphj/GzrRYz1BlAfjcrvGxa Xi02sgo5UyAl/8u/+LsqDZahiQPu4srMpISsshheaxhO+OjV+1YDVR8ONxTuQiOuv8MZ 4/F2lhhn4JQeRdDnZaj0WCSuMPe3ptkDsfnTpVnoKiKyTTNOYTpmC5VmX3ua6E1+g2As bTmRbP1iNaBZnFJSbjsLKwgGs9zIyASgXSudpoo77oBtClNgvQhID7MmxEiFppsOtl13 ZXX21ri8YxE/BcupJXmXjOxHxOfxk8Quwe2QEkmdm3vTwybFfCGhy/kA0qg8t6tWKWxg f18Q== MIME-Version: 1.0 X-Received: by 10.42.50.3 with SMTP id y3mr37855372icf.12.1394635718509; Wed, 12 Mar 2014 07:48:38 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: <53206e6a$0$2886$e4fe514c@news2.news.xs4all.nl> References: <53206e6a$0$2886$e4fe514c@news2.news.xs4all.nl> Date: Wed, 12 Mar 2014 09:48:38 -0500 X-Google-Sender-Auth: lJDpSVUcq6dyS2S30yYNEaQmF74 Subject: Re: Deep vs. shallow copy? From: Skip Montanaro To: Alex van der Spek Content-Type: text/plain; charset=UTF-8 Cc: Python 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394635721 news.xs4all.nl 2838 [2001:888:2000:d::a6]:42485 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68284 On Wed, Mar 12, 2014 at 9:25 AM, Alex van der Spek wrote: > with open(os.path.join('path', 'foo.txt', 'rb') as txt: > reader = csv.reader(txt) > data = [row.append(year) for row in reader] Forget deep v. shallow copies. What is the value of the variable year? And why would you expect list.append to return anything? Skip