Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: A name refers to an object, an object has a value, equality compares values (was: What is a function parameter =[] for?) Date: Wed, 25 Nov 2015 13:17:35 +1100 Lines: 40 Message-ID: References: <56544BAB.9020709@rece.vub.ac.be> <874mgbpnb5.fsf@elektro.pacujo.net> <486929d1-4caa-403c-89e6-c45d7b447f98@googlegroups.com> <5655035c$0$1609$c3e8da3$5496439d@news.astraweb.com> <201511250055.tAP0tpfO005889@fido.openend.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de JzGHES4NqOVnS94NyXcDjwwDQQwlYRyohExaemeqEHkA== Cancel-Lock: sha1:OISvhmaiUvlSWOYcgL1DEse9tpA= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'value,': 0.03; 'agrees': 0.09; 'creighton': 0.09; 'indeed,': 0.09; "object's": 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'syntax': 0.13; 'value.': 0.15; 'compares': 0.16; 'literals': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'subject:object': 0.16; 'subject:values': 0.16; 'laura': 0.18; '(in': 0.18; 'not,': 0.22; 'keys': 0.22; 'discussion': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'change,': 0.27; 'moved': 0.27; 'thinks': 0.29; 'time;': 0.29; "i'm": 0.30; 'work.': 0.30; 'point': 0.33; 'instead,': 0.33; 'word.': 0.33; 'previous': 0.34; 'list': 0.34; 'next': 0.35; 'clear': 0.35; 'but': 0.36; 'should': 0.36; 'created': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'say': 0.37; 'received:org': 0.37; 'things': 0.38; 'mean': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'term': 0.60; 'back': 0.62; 'different': 0.63; 'skip:\xe2 10': 0.70; 'duty': 0.72; '8bit%:46': 0.76; '_o__)': 0.84; 'identity;': 0.84; 'received:125': 0.84; 'subject:value': 0.84; 'typically,': 0.84; 'faith': 0.91; 'convinced': 0.93; 'cutting': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99410 Laura Creighton writes: > If I had a time machine, I would go back to early days of Python and > ban the use of the term 'assignment' and 'value' both. I would insist > that the term 'binding' be used instead, though if you want to use the > verb refer, to be synonymous with bind, well, I think that would work. +1 > (If not, next trip with the time machine, I ban that one as well.) I've never been able to remember where the keys are kept; I'm sure they keep being moved by previous drivers. > It is crystal clear than people on this list mean very different > things when they use the term 'value', and every one of them thinks > that Python agrees with them. Cutting this knot may require a new > word. Indeed, in the past I used the term “value” as synonymous (in Python context) with the term “object”. I have become convinced through this discussion that I should no longer use the terms that way. Instead, an object *has* a value at a point in time; if the object's value can change, we say the object is mutable. The syntax for literals describe a value, but the object once created may change its value. Typically, ‘is’ compares object identity; ‘==’ compares object value. The concepts are distinct, so I apologise for misleadingly conflating them in my terminology. -- \ “Skepticism is the highest duty and blind faith the one | `\ unpardonable sin.” —Thomas Henry Huxley, _Essays on | _o__) Controversial Questions_, 1889 | Ben Finney