Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.062 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'violates': 0.09; '*should*': 0.16; 'decision,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'implies': 0.16; 'janssen': 0.16; 'ought': 0.16; 'programmers,': 0.16; 'subclass': 0.16; 'subclasses': 0.16; 'subclassing': 0.16; 'subject:object': 0.16; 'substitution': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; 'saying': 0.22; 'laws': 0.24; 'defined': 0.27; 'header:In- Reply-To:1': 0.27; 'leave': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'work.': 0.31; 'are.': 0.31; 'class': 0.32; 'call.': 0.33; 'subject:the': 0.34; 'basic': 0.35; 'classes': 0.35; 'something': 0.35; 'done.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'instances': 0.36; 'method': 0.36; 'should': 0.36; 'wrong': 0.37; 'list': 0.37; 'list.': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'does': 0.39; 'itself': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'chain': 0.60; 'most': 0.60; 'new': 0.61; "you're": 0.61; 'first': 0.61; 'making': 0.63; 'different': 0.65; '26,': 0.68; 'fulfill': 0.68; 'everything,': 0.84; 'children.': 0.93; 'contracts': 0.93; '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=wHP/W7h9QhHmwBwHHPBBB9xpo8gR3q29pjM/9m+4egc=; b=0bqmCzRtDVVcVnmNrvdkSjYp9q9lsyyR2QSuwZ1pEtru1muJrO4dA7iL1mlsdJIMAK ZTG6qBgzBBD9flTXnOOQF6T6XV68iu4BKToylqdHyEZzK3ZWfZl5ItUChEOv+MLIHr1N pH0jRwELY2pRs0spGzYLSwpWPFwJdtW9GUdLsrxTfQVKx28G/slOe3AFJra751Hz1TuI ux10WGQAfVOLurpa4G8HHoa6/CCGh+7VGch/NDjV4rbirVwEIsOipA+bU6XnjHV67zvp wP66wPX9Md7HW74TiW52ILlQBG7tJEspIkSEhweIDLNdxfNrrgLHo6PhMhs2/sQZhFbT pAww== MIME-Version: 1.0 X-Received: by 10.58.214.105 with SMTP id nz9mr656364vec.58.1372200478198; Tue, 25 Jun 2013 15:47:58 -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 08:47:58 +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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372200480 news.xs4all.nl 16010 [2001:888:2000:d::a6]:51894 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49204 On Wed, Jun 26, 2013 at 8:27 AM, Mark Janssen wrote: > Here's how it *should* be made: the most superest, most badassed > object should take care of its children. New instances should > automatically call up the super chain (and not leave it up to the > subclasses), so that the parent classes can take care of the chil'en. > When something goes wrong the parent class has to look in and see > what's wrong. So what you're saying is that the first class defined does everything, and subclasses _restrict_ what can be done? I disagree strongly: 1) That breaks the Liskov Substitution Principle. A subclass of list ought to fulfill the contracts of a basic list. 2) It implies that someone can invent an all-encompassing superclass before any subclassing is done. This kinda violates the laws of information. Programmers, being creative entities, will be adding to the pool of knowledge. Trying to shoehorn everything into one object won't work. It may be that you're not saying that, but you mean that the superclass decides which subclass's method to call. If that's what you meant, then I really don't know how it would be any different from the object itself making that decision, which is how things currently are. Or are both these interpretations wrong? ChrisA