Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52060

Re: Class hierarchy problem

Path csiph.com!usenet.pasdenom.info!aioe.org!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.136
X-Spam-Level *
X-Spam-Evidence '*H*': 0.74; '*S*': 0.01; 'clear.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'tier': 0.16; 'way;': 0.16; 'wrote:': 0.18; 'widget': 0.19; 'aug': 0.22; 'subject:problem': 0.24; 'header:In-Reply-To:1': 0.27; 'related': 0.29; 'message-id:@mail.gmail.com': 0.30; 'knows': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'being': 0.38; 'generic': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'is.': 0.60; 'kingdom': 0.61; 'effectively': 0.66; 'believe': 0.68; 'subject:Class': 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=toM/TZVFvqNxTzAyv2VX7q1uYQGAVTHcuk2pFxW+Tio=; b=m1NERR1Br3Bc6xLxDi5kcYYODmfMwZFDJQ8WHXazADwM/RxUYPNWqwg6zFayDuFjbt qSrbzaUmEVJp8fu2zpvd+iJ1P4DyoFBDbj8qAns7S6nj28oXz8Q8YCdAHQVMY0eIZHFm D+aX6xlhbK9mvL2TuCqkP0e7by0jVyiF76HWqvCL0neJQhkhPqvmU8cVzhmeyt6UgG7r N9u41MIwCdithy4LQmFJ+p7FeM9lTtLBSdMgm9JSrjR2iqg8tfClsDYgpbnE/BgssrG7 GX+9coBDpihGtdm9dYceRmZkLZeGFhej4dkbN+Xetw96VFTWL6H+boQ1UGCMlG4aA28C ylLw==
MIME-Version 1.0
X-Received by 10.220.169.146 with SMTP id z18mr669752vcy.80.1375809157020; Tue, 06 Aug 2013 10:12:37 -0700 (PDT)
In-Reply-To <ktr56j$u7i$1@news.albasani.net>
References <ktqeho$f5i$1@news.albasani.net> <mailman.235.1375781442.1251.python-list@python.org> <520100F9.4010805@gmail.com> <mailman.254.1375797746.1251.python-list@python.org> <ktr56j$u7i$1@news.albasani.net>
Date Tue, 6 Aug 2013 18:12:36 +0100
Subject Re: Class hierarchy problem
From Chris Angelico <rosuav@gmail.com>
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 <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.267.1375809159.1251.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1375809159 news.xs4all.nl 15885 [2001:888:2000:d::a6]:44170
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52060

Show key headers only | View raw


On Tue, Aug 6, 2013 at 4:36 PM, BrJohan <brjohan@gmail.com> wrote:
> Consider a botanical classification system (somewhat analogous to my
> 'problem' as it effectively is related to classification of entities):
>
> A Domain should know about its Kingdoms,
> a Kingdom should know about its Phylums,
> ...
> a Genus should know about its Species.

I don't believe it's that clear. In some situations it may be best to
work that way; in others, each tier should know only those above it.
Does the generic Widget know about being a PushButton, a ListBox, and
a Slider? No, but the Slider knows what a Widget is.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Class hierarchy problem BrJohan <brjohan@gmail.com> - 2013-08-06 11:10 +0200
  Re: Class hierarchy problem Chris Angelico <rosuav@gmail.com> - 2013-08-06 10:30 +0100
    Re: Class hierarchy problem Chris Angelico <rosuav@gmail.com> - 2013-08-06 15:02 +0100
      Re: Class hierarchy problem BrJohan <brjohan@gmail.com> - 2013-08-06 17:36 +0200
        Re: Class hierarchy problem Joe Junior <joe.fbs.junior@gmail.com> - 2013-08-06 13:23 -0300
        Re: Class hierarchy problem Jordi Riera <kender.jr@gmail.com> - 2013-08-06 18:13 +0200
        Re: Class hierarchy problem Chris Angelico <rosuav@gmail.com> - 2013-08-06 18:12 +0100
        Re: Class hierarchy problem Terry Reedy <tjreedy@udel.edu> - 2013-08-06 19:13 -0400
        Re: Class hierarchy problem Ben Finney <ben+python@benfinney.id.au> - 2013-08-07 11:58 +1000
  Re: Class hierarchy problem Peter Otten <__peter__@web.de> - 2013-08-06 11:34 +0200
  Re: Class hierarchy problem Steven D'Aprano <steve@pearwood.info> - 2013-08-06 09:36 +0000
  pexpect,  loading an entry field inq1ltd <inq1ltd@inqvista.com> - 2013-08-06 11:05 -0400
  Re: pexpect, loading an entry field "Lakshmipathi.G" <lakshmipathi.g@gmail.com> - 2013-08-06 22:04 +0530
  Re: pexpect, loading an entry field inq1ltd <inq1ltd@inqvista.com> - 2013-08-06 14:03 -0400
  Re: pexpect, loading an entry field "Lakshmipathi.G" <lakshmipathi.g@gmail.com> - 2013-08-07 13:40 +0530

csiph-web