Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.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.054 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; '"class"': 0.09; 'integers': 0.09; 'subtle': 0.09; 'python': 0.11; 'ah,': 0.16; 'composition.': 0.16; 'dict': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hides': 0.16; 'inheritance': 0.16; 'interpreter,': 0.16; 'janssen': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'wed,': 0.18; '>>>': 0.22; 'saying': 0.22; 'certainly': 0.24; 'lets': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'container': 0.31; 'object.': 0.31; 'piece': 0.31; 'public.': 0.31; 'class': 0.32; 'critical': 0.32; 'subject:the': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'c++': 0.36; 'set.': 0.36; 'members.': 0.37; 'two': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'anything': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'how': 0.40; 'days': 0.60; "you're": 0.61; "you've": 0.63; 'making': 0.63; 'between': 0.67; '26,': 0.68; 'combining': 0.68; 'fact,': 0.69; 'gotten': 0.74; 'gain': 0.79; 'difference.': 0.84; 'hardly': 0.84; 'thing,': 0.91; '2013': 0.98 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=A6j+onvMVWfRtgD5+wzDQjfgMVF+dL9NUEJxT7Qx9Po=; b=gCI8LJt8eRbb4Pzr1LAna2xAGzrfMINvTt1VgabFS8ClUmWMp9qEU0N6JOFUYAJQwB fcCnrjQEArQPjUEAeSklNCGqrH0ZW6DHSH14vvPFhq3SdVEsasml3NqZ8SK47NKG9vp8 fkf3Njt0gDLG0udZaVQc2W6NvO2SuR5O3CYbkNK4OjEwBUNgX7yGiINjaCiHJryg8wgF iy4N21Fg1EfwWPwdC+79dfSY/kwXKBQE6IoZ1fBZTqGWBRgCWtrFZuakx2bywxhjBmAz dq3mfSvjPjoRVeJqppyU7n0YgJ2QHhvg2I9I8xN42OshRnSbbllA2Uk1v5qPe4mRTNcm O4Fw== MIME-Version: 1.0 X-Received: by 10.52.163.165 with SMTP id yj5mr1006708vdb.104.1372231549351; Wed, 26 Jun 2013 00:25:49 -0700 (PDT) In-Reply-To: References: <15ba0011-bbf1-42f7-b3ea-1c1d4b70e56b@googlegroups.com> <51c66962$0$29999$c3e8da3$5496439d@news.astraweb.com> <20130623133546.GA2308@capricorn> <51c723b4$0$29999$c3e8da3$5496439d@news.astraweb.com> <51C74D6E.6030200@rece.vub.ac.be> Date: Wed, 26 Jun 2013 17:25:49 +1000 Subject: Re: What is the semantics meaning of 'object'? 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.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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372231552 news.xs4all.nl 15891 [2001:888:2000:d::a6]:48134 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49231 On Wed, Jun 26, 2013 at 11:07 AM, Mark Janssen wrote: >>>> Combining two integers lets you make a Rational. >>> >>> Ah, but what is going to group them together? You see you've already >>> gotten seduced. Python already uses a set to group them together -- >>> it's called a Dict and it's in every Class object. >> >> When you inherit a "set" to make a Rational, you're making the >> statement (to the interpreter, if nothing else) that a Rational is-a >> set. > > No you don't *inherit* a set to make a Rational, although you gain a > set to make it. It's a subtle thing, because at the center of it > articulates the very difference between a piece of data and a > container to hold that data. Or is the container the data? > > C++ already solves this di-lemma. It made "class" which is exactly > like a "struct", but hides all it's data members. That critical > distinction makes all the difference. I don't know how many people on > the list really appreciate it. I certainly don't. In fact, I hardly use "class" in C++ these days - I just use "struct" and let the members be public. How is that significant? The thing you're completely missing, though, is that NONE of what you're saying has anything to do with inheritance or super(). It's all composition. ChrisA