Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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; 'python,': 0.02; 'subject:Python': 0.05; 'url:blog': 0.09; 'python': 0.09; 'already.': 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; 'url:voidspace': 0.09; 'worse': 0.09; 'advance': 0.10; 'suggest': 0.11; 'language': 0.14; 'dictionaries': 0.16; 'message-id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:object': 0.16; 'subject:oriented': 0.16; 'subject:programming': 0.16; 'url:oreilly': 0.16; 'url:shtml': 0.16; 'wrote:': 0.17; 'python?': 0.20; 'together.': 0.21; 'oriented': 0.22; 'example': 0.23; 'programming': 0.23; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'question': 0.27; '???': 0.27; 'c++': 0.27; 'header:X-Complaints-To:1': 0.28; 'trouble': 0.28; 'jean': 0.29; 'question:': 0.29; 'starts': 0.29; 'probably': 0.29; 'unlike': 0.30; 'url:python': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'could': 0.32; 'programming,': 0.33; 'url:event': 0.33; 'to:addr:python- list': 0.33; 'languages': 0.33; 'thanks': 0.34; 'list': 0.35; 'received:org': 0.36; 'really': 0.36; 'explain': 0.36; 'but': 0.36; 'url:org': 0.36; 'subject:with': 0.36; 'pdf': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'fact': 0.38; 'object': 0.38; 'some': 0.38; 'url:docs': 0.38; 'url:en': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'header:Received:5': 0.40; 'end': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'url:index': 0.61; 'url:%20': 0.63; 'email addr:gmail.com': 0.63; 'making': 0.64; 'here': 0.65; 'difficulty': 0.65; 'url:%1': 0.68; 'subject:good': 0.84; 'url:oop': 0.84; 'video:': 0.84; 'url:assets': 0.91; 'url:tutorial': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Looking for a good introduction to object oriented programming with Python Date: Sun, 05 Aug 2012 19:28:56 +0100 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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-146-0-136.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <8f1b60a5-0411-4aae-9ee6-0025b493ca2d@m13g2000vbd.googlegroups.com> X-Antivirus: avast! (VPS 120805-0, 05/08/2012), Outbound message X-Antivirus-Status: Clean 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1344191242 news.xs4all.nl 6958 [2001:888:2000:d::a6]:59515 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26542 On 05/08/2012 19:04, Jean Dubois wrote: > On 5 aug, 02:11, shearich...@gmail.com wrote: >> One reason you may be having difficulty is that unlike some languages (C++/Java) object-orientation is not a be all and end all in Python, in fact you could work with Python for a long time without really 'doing it' at all (well other than calling methods/properties on existing API's). Having said that here's what I would suggest ... >> >> Could do worse than this : >> >> http://www.diveintopython.net/object_oriented_framework/index.html >> > This example seems to tell you need the concept of dictionaries to > explain object oriented programming, is this really necessary? >> and this >> >> http://docs.python.org/tutorial/classes.html > 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. >> >> read together. >> >> Judging by your question this is a probably a little advanced for now but you could bookmark it for the future: >> >> http://www.catonmat.net/blog/learning-python-design-patterns-through-... >> >> Here's the corresponding PDF to go with the video: >> >> http://assets.en.oreilly.com/1/event/45/Practical%20Python%20Patterns... > Can someone here on this list give a trivial example of what object > oriented programming is, using only Python? > > thanks in advance > Jean > Try this http://www.voidspace.org.uk/python/articles/OOP.shtml ??? -- Cheers. Mark Lawrence.