Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:not': 0.03; 'correct.': 0.07; 'referring': 0.07; 'arguments': 0.09; 'classes.': 0.09; 'imply': 0.09; 'instance.': 0.09; 'python:': 0.09; 'raises': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sub': 0.09; 'subject:instance': 0.09; 'python': 0.11; 'class;': 0.16; 'finney': 0.16; 'implies': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:)?': 0.16; 'subject:object': 0.16; 'trying': 0.19; 'programming': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'class.': 0.26; 'asking': 0.27; 'values': 0.27; 'header:X -Complaints-To:1': 0.27; "doesn't": 0.30; "i'm": 0.30; 'argue': 0.31; 'convince': 0.31; 'implicit': 0.31; 'object.': 0.31; 'writes:': 0.31; 'subject: (': 0.35; 'agree': 0.35; 'objects': 0.35; 'but': 0.35; 'instances': 0.36; 'otherwise.': 0.36; 'shows': 0.36; 'changing': 0.37; 'so,': 0.37; 'ben': 0.38; 'to:addr:python- list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'term': 0.63; 'refer': 0.63; 'skip:\xe2 10': 0.65; 'believe': 0.68; 'improvement.': 0.68; '8bit%:43': 0.74; 'ambiguous': 0.84; 'brain,': 0.84; 'confusing': 0.84; 'fourth': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: An object is an instance (or not)? Date: Wed, 28 Jan 2015 09:32:09 +1100 References: <80a9f882-6b13-45a7-b514-8c47b3a4c37d@googlegroups.com> <9a2cf6ca-2eb8-4a87-9e83-e87d90d5fe42@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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) Cancel-Lock: sha1:UWTrHCI/wC3mwWFTmVqAivlrwh8= 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422397927 news.xs4all.nl 2931 [2001:888:2000:d::a6]:54271 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84681 Mario Figueiredo writes: > People were saying to me that in Python object = instance. I'm trying > to argue why I believe it isn't and asking for arguments to convince > me otherwise. In Python: * Every value is an object. * Every object is an instance of some class. * To say “object” is uproblematic for values in Python, because the programming term “object” doesn't imply anything about classes. * To say “instance” implies a specific relationship to some particular class; in programming terminology (because in English generally) an instance is so called only because it is an instance of some specific class. > By referring to an instance of Sub as "Sub object", there's an > implicit affirmation that an object is an instance. Correct. That raises a fourth point: * In the distant past of Python, some objects were not instances of any class; the terminology in the documentation and messages shows some confusing legacies from that ancient time. The phrasing “'Foo' object” is ambiguous in a way that “'Foo' instance” would not be. I agree with others that changing the message to refer to “'Foo' instance” would be an improvement. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but I find scratching just makes it worse.” —_Pinky and | _o__) The Brain_ | Ben Finney