Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:: [': 0.03; 'operator': 0.03; 'patterns': 0.04; 'subject:Python': 0.05; 'objects,': 0.07; 'aliases': 0.09; 'expense': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'aug': 0.13; 'represents': 0.15; 'finer': 0.16; 'function"': 0.16; 'objects?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:object': 0.16; 'subject:oriented': 0.16; 'subject:programming': 0.16; 'those,': 0.16; 'subject:] ': 0.19; 'sort': 0.21; '(usually': 0.22; "i've": 0.23; 'second': 0.24; 'header:X-Complaints-To:1': 0.28; "d'aprano": 0.29; 'steven': 0.29; 'manual': 0.29; '"the': 0.29; 'probably': 0.29; 'e.g.': 0.30; '(and': 0.32; 'implement': 0.32; "aren't": 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'everyone': 0.33; 'requirements': 0.33; "can't": 0.34; 'software,': 0.35; 'sometimes': 0.35; 'something': 0.35; 'there': 0.35; 'received:org': 0.36; 'really': 0.36; 'but': 0.36; 'useful': 0.36; 'subject:with': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'two': 0.37; 'being': 0.37; 'why': 0.37; 'late': 0.37; 'previous': 0.37; 'mean': 0.38; 'some': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'telling': 0.61; 'first': 0.61; 'ever': 0.63; 'times': 0.63; 'skip:n 10': 0.63; 'become': 0.65; 'differences': 0.65; 'lights': 0.65; 'soon': 0.70; 'sounds': 0.71; 'mystical': 0.84; 'subject:good': 0.84; 'surge': 0.84; 'beings': 0.91; 'dennis': 0.91; 'indicator': 0.91; 'payroll': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: [newbie] Looking for a good introduction to object oriented programming with Python Date: Sun, 05 Aug 2012 21:14:04 -0400 Organization: > Bestiaria Support Staff < References: <54b916fe-9e2d-4f9e-b533-b5ecf677c8a5@a19g2000vba.googlegroups.com> <501f0e4a$0$29867$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-109-235.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES 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: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1344215659 news.xs4all.nl 6844 [2001:888:2000:d::a6]:33386 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26598 On 06 Aug 2012 00:22:34 GMT, Steven D'Aprano declaimed the following in gmane.comp.python.general: > Is this some sort of mystical "humans aren't objects, they're SPECIAL!!!" > rubbish? Because it sure sounds like it. > > Can you give some non-religious reasons why you should not implement > human beings or aliases as objects? > I think it's an over-simplification of humans being "actors" who drive the software, and not something ("chess pieces") that the software should be driving. (OTOH: how many remember that surge in "up-shift" indicator lights on manual transmission cars, near the late 70s early 80s? The few times I drove one of those, it was telling me to up-shift as soon as I let out the clutch from the previous up-shift). Though to me, that really means there should be no requirements phrased as "the operator shall "; it should be "the software shall ". Taken literally, the prohibition would mean no modeling of Employees in a payroll or HR system -- since Employee represents a person working for the company. > The emphasis on *names* is just jargon, design patterns are actually just > problem-solving techniques. Sometimes it's useful to have jargon that > everyone recognises, e.g. "factory function" and "singleton" are two I > consistently remember (and I use the first *all the time* and the second > *never*), but often Design Pattern proponents become side-tracked into > finer and finer differences of greater and greater abstraction, at the > expense of clarity. > While I've probably used singletons (usually as sentinels in queues, I suspect), but can't say that I've ever used a "factory function"... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/