Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9588
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| 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; 'subject:" ': 0.03; 'suppose': 0.05; 'raised': 0.07; 'raises': 0.07; '(sorry,': 0.09; 'question:': 0.09; 'rule.': 0.09; 'subclasses': 0.09; 'substitution': 0.09; 'am,': 0.13; 'wrote:': 0.15; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'resist': 0.16; 'subject: \n ': 0.16; 'subject:() ': 0.16; 'things?': 0.16; 'utterly': 0.16; '\xa0def': 0.16; '16,': 0.16; 'subject:was': 0.16; 'subject:list': 0.16; 'subject:skip:d 10': 0.17; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'subject:not': 0.21; 'header:In-Reply- To:1': 0.22; 'breaks': 0.23; '"this': 0.25; 'raise': 0.28; 'sat,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'student': 0.30; '*and*': 0.30; 'class': 0.31; 'chris': 0.32; 'does': 0.32; 'break': 0.33; 'to:addr:python-list': 0.34; 'instead': 0.34; 'sense,': 0.35; 'speaking': 0.35; 'but': 0.37; 'could': 0.37; 'another': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'should': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'act': 0.64; '10:04': 0.84; 'ps.': 0.84; 'subject:should': 0.84; 'subject:place': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=c7+QYxmf/62yYmxQgMiMA5usBiEvb6FHqSybbcsGTi4=; b=TIScFFeKcipK9J+DVMZQ2hQJXHR9tKfXcd045h4PUBXYUKvCOCw/XJOWAYXupv6G7r P2G/3tWzYbE1q2uY2Bx70tQP07Oc2EaxyxM4/T0Iv9kyMTlWrpfNJg/uZ9tUebhOWnNp OwVZ9Cn+f4XNU2cxle/8KaQB4BUfVjwYf/nSI= |
| MIME-Version | 1.0 |
| In-Reply-To | <87zkkf9jl7.fsf_-_@benfinney.id.au> |
| References | <87ei1sb3x9.fsf@benfinney.id.au> <cf0e04cc-a065-4fc4-ab25-777adadafb81@glegroupsg2000goo.googlegroups.com> <mailman.1088.1310772475.1164.python-list@python.org> <87zkkf9jl7.fsf_-_@benfinney.id.au> |
| Date | Sat, 16 Jul 2011 10:17:48 +1000 |
| Subject | Re: Liskov substitution principle (was: list(), tuple() should not place at "Built-in functions" in documentation) |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1095.1310775472.1164.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1310775472 news.xs4all.nl 23900 [2001:888:2000:d::a6]:37466 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9588 |
Show key headers only | View raw
On Sat, Jul 16, 2011 at 10:04 AM, Ben Finney <ben+python@benfinney.id.au> wrote: > def study(self, subject): > raise NotImplementedError > > See? We can have overstretched analogies *and* remain within the Liskov > substitution principle. > Hehe! Of course I was speaking utterly in jest, but this raises (sorry, never could resist a bad pun) another question: What if the base class implemented study(), and then LazyStudent subclasses Student but makes study() raise NotImpl? Would that break things? In a sense, it breaks the whole "this is a student so it should act like a student" rule. Suppose it raised UtterApathyError instead - does that break the LSP? Chris A PS. The world's first horseless signature... trapped in the air!
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: list(),tuple() should not place at "Built-in functions" in documentation Inside <fancheyujian@gmail.com> - 2011-07-15 12:53 -0700
Type checking versus polymorphism (was: list(),tuple() should not place at "Built-in functions" in documentation) Ben Finney <ben+python@benfinney.id.au> - 2011-07-16 09:24 +1000
Re: Type checking versus polymorphism (was: list(),tuple() should not place at "Built-in functions" in documentation) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-16 12:47 +1000
Re: Type checking versus polymorphism (was: list(), tuple() should not place at "Built-in functions" in documentation) Chris Rebert <clp2@rebertia.com> - 2011-07-15 22:02 -0700
Re: Type checking versus polymorphism (was: list(), tuple() should not place at "Built-in functions" in documentation) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-16 16:33 +1000
Re: list(), tuple() should not place at "Built-in functions" in documentation Chris Angelico <rosuav@gmail.com> - 2011-07-16 09:27 +1000
Liskov substitution principle (was: list(), tuple() should not place at "Built-in functions" in documentation) Ben Finney <ben+python@benfinney.id.au> - 2011-07-16 10:04 +1000
Re: Liskov substitution principle (was: list(), tuple() should not place at "Built-in functions" in documentation) Chris Angelico <rosuav@gmail.com> - 2011-07-16 10:17 +1000
Re: Liskov substitution principle Ben Finney <ben+python@benfinney.id.au> - 2011-07-16 11:47 +1000
Re: list(),tuple() should not place at "Built-in functions" in documentation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-16 14:06 +1000
csiph-web