Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'subject:Python': 0.05; 'classes,': 0.05; 'attributes': 0.07; 'already.': 0.09; 'derived': 0.09; 'explanation': 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; 'language': 0.14; 'merger': 0.16; 'neutral': 0.16; 'preprocessor': 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; 'things...': 0.16; 'tuning,': 0.16; 'instance': 0.17; 'widely': 0.17; 'define': 0.20; 'meant': 0.21; 'programming': 0.23; 'class.': 0.23; 'common': 0.26; 'skip:" 20': 0.26; 'separate': 0.27; 'besides': 0.27; 'c++': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'skip:( 20': 0.28; 'trouble': 0.28; 'jean': 0.29; 'oop': 0.29; 'question:': 0.29; 'starts': 0.29; 'class': 0.29; 'maybe': 0.29; 'asking': 0.32; 'could': 0.32; 'cases,': 0.33; 'instances': 0.33; 'proposals': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'likely': 0.33; 'text': 0.34; 'wrong': 0.34; 'along': 0.35; 'similar': 0.35; 'received:org': 0.36; 'but': 0.36; "didn't": 0.36; 'subject:with': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'level': 0.37; 'two': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'short': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'share': 0.61; 'first': 0.61; 'more': 0.63; 'making': 0.64; 'state,': 0.65; 'analysis': 0.70; 'power': 0.74; 'band.': 0.84; 'cover,': 0.84; 'subject:good': 0.84; 'textbook': 0.84; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Looking for a good introduction to object oriented programming with Python Date: Sun, 05 Aug 2012 18:45:47 -0400 Organization: > Bestiaria Support Staff < References: <54b916fe-9e2d-4f9e-b533-b5ecf677c8a5@a19g2000vba.googlegroups.com> <8f1b60a5-0411-4aae-9ee6-0025b493ca2d@m13g2000vbd.googlegroups.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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1344206762 news.xs4all.nl 6847 [2001:888:2000:d::a6]:53047 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26577 On Sun, 5 Aug 2012 11:04:36 -0700 (PDT), Jean Dubois declaimed the following in gmane.comp.python.general: > Unfortunately, the trouble with this explanation is exactly what made > me ask the original question: it starts from concepts in c++ making it > very hard to understand for someone who does not know that language > already. Then maybe you are asking the wrong question... Don't look for Object-Oriented Programming -- since the first widely popular OOP language was C++ (Smalltalk was earlier, but rather specialized, whereas C++ started as a preprocessor for C). Rather look for Object-Oriented Analysis and Design (OOAD). An OOAD textbook /should/ be language neutral and, these days, likely using the constructs/notation of UML [which derived from a merger of two or three separate proposals for OOAD tools] An OOAD text should cover, besides Classes, Use Cases, state diagrams, and lots of other things... The short view of a Class is that it is a means of encapsulating the methods (functions/operations) of an object along with the attributes (data) of a specific instance of the class. A Radio Class would define methods to change the volume, power state, tuning, and band. These methods are common to all radios. But an instance of a radio doesn't share its volume level with all other instances of the Radio class. OOP is more a style/philosophy of programming by using "objects". Ada 95 is an OOP language but didn't have the "object.method(parameters)" syntax (one had to use "method(object, parameters", but the language could determine which of similar named methods was meant based upon the type of "object" and the types of the parameters). -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/