Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1a.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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'suddenly': 0.07; 'objects,': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; 'mostly': 0.14; '(represented': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'non-data': 0.16; 'object;': 0.16; 'objects.': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'module': 0.19; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'circular': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'somewhere': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'correct': 0.29; 'said,': 0.30; 'statement': 0.30; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'object.': 0.31; 'class': 0.32; 'languages': 0.32; "we're": 0.32; 'not.': 0.33; 'trouble': 0.34; "can't": 0.35; 'etc': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'object,': 0.36; 'useful': 0.36; 'being': 0.38; 'pm,': 0.38; 'does': 0.39; 'is.': 0.60; 'number,': 0.60; 'back': 0.62; 'name': 0.63; 'pick': 0.64; 'become': 0.64; 'number:': 0.66; 'batchelder': 0.84; 'data;': 0.84; 'mistakenly': 0.91; '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=upV97LGWDXezoXBZYIk6AQJm3YJH74ioYBaBs546Wmg=; b=oMyVSBinlrwkLFA2u26bieakrZ3EaoH8KF4uTrp7LQWu8xDxssLypg8hMr+F2TOmXo 59lFc6fZ43hJzLAPMLbEEkmUCRhTyV7hvLkoZQnOq/yaVCMGtlu6dLYyYdPpzrmRop8u 8mhUBxeZY1KbRocmdFKU8wO0WoESMtCPQiYd93yjJFT39ju9bgVbMwRiMU4r3uio2FG7 t8zgeZhuKPw2RKKGy3jnU1tAeYekUXkoM7oIJ9+Cmgdgz+K8bzMA1/8WmeXmQ9WYmqAQ M/ReSdaoXVjN66AUMK1Iu5oVEHQ15PZM1dH+7ZYtIS7eE1RneRPTi1YM9s1uhHyaU3Lu YyJQ== MIME-Version: 1.0 X-Received: by 10.68.201.10 with SMTP id jw10mr23657434pbc.25.1392602365251; Sun, 16 Feb 2014 17:59:25 -0800 (PST) In-Reply-To: References: <13208de8-0f85-4e60-b059-dc087c8fda41@googlegroups.com> <52fefccc$0$29973$c3e8da3$5496439d@news.astraweb.com> <52ff0dc5$0$29973$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 17 Feb 2014 12:59:25 +1100 Subject: Re: Explanation of list reference 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392602374 news.xs4all.nl 2863 [2001:888:2000:d::a6]:58151 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66578 On Mon, Feb 17, 2014 at 12:43 PM, Ned Batchelder wrote: > The correct statement is "all values are objects", or "all data is objects". > When people mistakenly say "everything is an object", they are implicitly > only thinking about data. > > That said, "all data is objects" is really mostly useful in contrast to > other languages where some data is objects and some is not. Part of the trouble is that some code is (represented by) objects. A function is an object, ergo it's data; a module is an object (though that's different); a class is an object; but no other block of code is. You can't give a name to a while loop, then pick it up and use it somewhere else. x = while input("Guess my number: ")!="42": print("Wrong number, try again.") So a while loop isn't data. But wrap it in a function and suddenly it is: def x(): while input("Guess my number: ")!="42": print("Wrong number, try again.") y = x func(x) etc So when does code become data? When it's represented by an object. What's an object and what's not? Data is objects, non-data is not. And we're back to being circular again. (Does this mean we're having a circular discussion about circular definitions?) ChrisA