Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'output': 0.04; 'debug': 0.05; 'type,': 0.07; 'terry': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; ':-)': 0.13; '-tkc': 0.16; 'b):': 0.16; 'declaration': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'inputs': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'reedy': 0.16; 'unittests': 0.16; 'values:': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'meant': 0.21; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'checking': 0.27; 'restrict': 0.27; 'declared': 0.29; "i'm": 0.29; "skip:' 10": 0.30; 'usually': 0.30; 'returned': 0.30; 'function': 0.30; 'code': 0.31; '(and': 0.32; 'could': 0.32; 'surely': 0.33; 'wrong': 0.34; 'quite': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'sure': 0.38; 'instead': 0.39; 'where': 0.40; 'your': 0.60; 'subject:, ': 0.61; 'strange': 0.62; 'limited.': 0.64; 'making': 0.64; "'if": 0.84; 'furman': 0.84; 'received:50.22': 0.84; 'ethan': 0.91; 'kat': 0.91; 'subject:skip:E 10': 0.95 Date: Tue, 17 Jul 2012 12:51:39 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 MIME-Version: 1.0 To: Ethan Furman Subject: Re: Encapsulation, inheritance and polymorphism References: <3vnfd9-343.ln1@satorlaser.homedns.org> <-8SdnVrXGqie25jNnZ2dnUVZ7qKdnZ2d@bt.com> <5005A103.9050802@stoneleaf.us> In-Reply-To: <5005A103.9050802@stoneleaf.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 1342548192 news.xs4all.nl 6905 [2001:888:2000:d::a6]:48520 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25526 On 07/17/12 12:29, Ethan Furman wrote: > Terry Reedy wrote: >> On 7/17/2012 10:23 AM, Lipska the Kat wrote: >> >>> Well 'type-bondage' is a strange way of thinking about compile time type >>> checking and making code easier to read (and therefor debug >> >> 'type-bondage' is the requirement to restrict function inputs and output >> to one declared type, where the type declaration mechanisms are usually >> quite limited. >> >> >>> def max(a, b): >> if a <= b: return a >> return b > > > Surely you meant 'if a >= b: . . .' > > No worries, I'm sure your unittests would have caught it. ;) Or he could have meant "min" instead of "max". Or he could have returned the wrong values: def max(a, b): if a <= b: return b return a :-) -tkc