Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26633
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| 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; 'python,': 0.02; 'subject:Python': 0.05; 'doctest': 0.07; 'try:': 0.07; 'url:blog': 0.09; 'python': 0.09; '"""class': 0.09; 'already.': 0.09; 'docstrings': 0.09; 'explanation': 0.09; 'lawrence': 0.09; 'lines:': 0.09; 'posting.': 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; 'def': 0.10; 'suggest': 0.11; 'language': 0.14; 'library': 0.15; '"""method': 0.16; 'dictionaries': 0.16; 'docstring': 0.16; 'hint': 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; 'this)': 0.16; 'url:oreilly': 0.16; 'url:shtml': 0.16; 'wrote:': 0.17; 'thanks,': 0.18; '>>>': 0.18; 'code,': 0.18; 'python?': 0.20; 'bit': 0.21; 'thanks.': 0.21; 'together.': 0.21; 'oriented': 0.22; 'example': 0.23; 'programming': 0.23; 'mention': 0.23; 'task': 0.23; 'seems': 0.23; 'testing': 0.24; 'pass': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'question': 0.27; 'c++': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'trouble': 0.28; '>>>>': 0.29; 'jean': 0.29; 'question:': 0.29; 'url:mailman': 0.29; 'starts': 0.29; 'skip:_ 10': 0.29; 'probably': 0.29; 'class': 0.29; 'unlike': 0.30; 'code': 0.31; 'url:python': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'could': 0.32; 'print': 0.32; 'url:listinfo': 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; 'method': 0.36; 'subject:with': 0.36; 'author': 0.37; 'pdf': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'comment': 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; 'url:mail': 0.40; 'your': 0.60; 'bottom': 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; 'august': 0.66; 'news': 0.68; 'url:%1': 0.68; 'prefers': 0.84; 'subject:good': 0.84; 'url:oop': 0.84; 'video:': 0.84; 'fragment': 0.91; 'url:assets': 0.91; 'url:tutorial': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: Looking for a good introduction to object oriented programming with Python |
| Date | Mon, 06 Aug 2012 17:17:33 +0100 |
| References | <54b916fe-9e2d-4f9e-b533-b5ecf677c8a5@a19g2000vba.googlegroups.com> <ab728c00-411d-4e25-a4e6-fbec496963c1@googlegroups.com> <8f1b60a5-0411-4aae-9ee6-0025b493ca2d@m13g2000vbd.googlegroups.com> <mailman.2966.1344191242.4697.python-list@python.org> <94492584-4446-47ff-85c4-749de850561e@b10g2000vbj.googlegroups.com> <CAExgZOi35G_dtU59UgArt4CcUiTrQWNC2=xgbjwZAjEtdNRxwA@mail.gmail.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-92-24-124-25.ppp.as43234.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
| In-Reply-To | <CAExgZOi35G_dtU59UgArt4CcUiTrQWNC2=xgbjwZAjEtdNRxwA@mail.gmail.com> |
| X-Antivirus | avast! (VPS 120806-0, 06/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 <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.3017.1344269795.4697.python-list@python.org> (permalink) |
| Lines | 120 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1344269795 news.xs4all.nl 6928 [2001:888:2000:d::a6]:49759 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:26633 |
Show key headers only | View raw
Please see my comment at the bottom hint hint :) On 06/08/2012 16:38, Ramchandra Apte wrote: > Its a docstring - it documents the function/class > Did you know that docstrings can be used for testing - look at the doctest > standard library module! > try: > > class A: > def method(self): > '''Sample method > This method does the difficult task X. > Call this method with no arguments.'''#docstring > pass > > then type : > > help(A.method) > > And viola! > On 6 August 2012 20:26, Jean Dubois <jeandubois314@gmail.com> wrote: > >> On 5 aug, 20:28, Mark Lawrence <breamore...@yahoo.co.uk> wrote: >>> 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 thishttp://www.voidspace.org.uk/python/articles/OOP.shtml??? >>> >>> -- >>> Cheers. >>> >>> Mark Lawrence. >> Thanks, this one is a lot better. Could you just tell me what the use >> is of the following lines: >> """Class docstring.""" >> """Method docstring.""" >> """Method docstring.""" >> Taken from the following code fragment (I really want to understand >> every bit of code, and the author doesn't mention this) >> >> >> class OurClass(object): >> """Class docstring.""" >> >> def __init__(self, arg1, arg2): >> """Method docstring.""" >> self.arg1 = arg1 >> self.arg2 = arg2 >> >> def printargs(self): >> """Method docstring.""" >> print self.arg1 >> print self.arg2 >> >> >> >> thanks in advance >> jean >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > > > Ramchandra Apte will you please stop top posting. In your native language you may well but from bottom to top, but this news group prefers reading top to bottom :) Thanks. -- Cheers. Mark Lawrence.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[newbie] Looking for a good introduction to object oriented programming with Python Jean Dubois <jeandubois314@gmail.com> - 2012-08-04 08:49 -0700
Re: [newbie] Looking for a good introduction to object oriented programming with Python shearichard@gmail.com - 2012-08-04 17:11 -0700
Re: Looking for a good introduction to object oriented programming with Python Jean Dubois <jeandubois314@gmail.com> - 2012-08-05 05:38 -0700
Re: Looking for a good introduction to object oriented programming with Python Jean Dubois <jeandubois314@gmail.com> - 2012-08-05 11:04 -0700
Re: Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-05 19:28 +0100
Re: Looking for a good introduction to object oriented programming with Python Jean Dubois <jeandubois314@gmail.com> - 2012-08-06 07:56 -0700
Re: Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-06 17:17 +0100
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 01:12 +0000
Re: Looking for a good introduction to object oriented programming with Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-07 11:23 +1000
Re: Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-07 08:49 +0100
Re: Looking for a good introduction to object oriented programming with Python Roy Smith <roy@panix.com> - 2012-08-05 14:39 -0400
Re: Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-05 19:53 +0100
Re: Looking for a good introduction to object oriented programming with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-05 18:45 -0400
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-05 22:51 +0000
Re: Looking for a good introduction to object oriented programming with Python Roy Smith <roy@panix.com> - 2012-08-05 19:12 -0400
Re: Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-06 00:30 +0100
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-06 00:27 +0000
Re: Looking for a good introduction to object oriented programming with Python Dan Sommers <dan@tombstonezero.net> - 2012-08-05 17:50 -0700
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 08:48 +0100
Re: Looking for a good introduction to object oriented programming with Python DJC <djc@news.invalid> - 2012-08-06 11:20 +0200
Re: Looking for a good introduction to object oriented programming with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-05 20:57 -0400
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 08:43 +0100
Re: Looking for a good introduction to object oriented programming with Python Roy Smith <roy@panix.com> - 2012-08-06 09:16 -0400
Re: Looking for a good introduction to object oriented programming with Python Wolfgang Strobl <news4@mystrobl.de> - 2012-08-06 08:18 +0200
Re: [newbie] Looking for a good introduction to object oriented programming with Python dncarac@gmail.com - 2012-08-05 11:59 -0700
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-05 20:46 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-05 23:11 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Roy Smith <roy@panix.com> - 2012-08-05 18:53 -0400
Re: [newbie] Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-06 00:22 +0000
Re: [newbie] Looking for a good introduction to object oriented programming with Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-08-06 02:02 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-05 21:14 -0400
Re: [newbie] Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-06 06:08 +0000
Re: [newbie] Looking for a good introduction to object oriented programming with Python Paul Rubin <no.email@nospam.invalid> - 2012-08-06 00:25 -0700
Re: Looking for a good introduction to object oriented programming with Python alex23 <wuwei23@gmail.com> - 2012-08-05 19:44 -0700
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 19:02 +0000
Re: Looking for a good introduction to object oriented programming with Python Terry Reedy <tjreedy@udel.edu> - 2012-08-07 18:37 -0400
Re: Looking for a good introduction to object oriented programming with Python alex23 <wuwei23@gmail.com> - 2012-08-07 17:07 -0700
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-08 02:14 +0000
Re: Looking for a good introduction to object oriented programming with Python Chris Angelico <rosuav@gmail.com> - 2012-08-08 12:24 +1000
Re: Looking for a good introduction to object oriented programming with Python alex23 <wuwei23@gmail.com> - 2012-08-07 20:20 -0700
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 09:55 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 10:24 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 05:35 +0000
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 09:16 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 05:19 +0000
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 10:19 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Ben Finney <ben+python@benfinney.id.au> - 2012-08-07 23:12 +1000
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 15:13 +0100
Re: [newbie] Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 14:14 +0000
Re: [newbie] Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 15:34 +0100
Re: Looking for a good introduction to object oriented programming with Python rusi <rustompmody@gmail.com> - 2012-08-07 08:04 -0700
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 18:00 +0100
Re: Looking for a good introduction to object oriented programming with Python Chris Angelico <rosuav@gmail.com> - 2012-08-08 07:57 +1000
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 10:51 +0100
Re: Looking for a good introduction to object oriented programming with Python rusi <rustompmody@gmail.com> - 2012-08-08 09:27 -0700
Re: Looking for a good introduction to object oriented programming with Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-08 17:28 +0000
Re: Looking for a good introduction to object oriented programming with Python Chris Angelico <rosuav@gmail.com> - 2012-08-09 11:32 +1000
Re: Looking for a good introduction to object oriented programming with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-08 12:42 -0400
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 20:31 +0100
Re: Looking for a good introduction to object oriented programming with Python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-08 22:59 -0400
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-09 08:29 +0100
Geneology Packages -- WAS: Looking for a good introduction to object oriented programming with Python Simon Cropper <simoncropper@fossworkflowguides.com> - 2012-08-09 13:51 +1000
Re: Geneology Packages Ben Finney <ben+python@benfinney.id.au> - 2012-08-09 14:00 +1000
Re: Looking for a good introduction to object oriented programming with Python rusi <rustompmody@gmail.com> - 2012-08-06 05:19 -0700
Re: Looking for a good introduction to object oriented programming with Python lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 15:27 +0100
Re: Looking for a good introduction to object oriented programming with Python rusi <rustompmody@gmail.com> - 2012-08-06 09:34 -0700
Re: Looking for a good introduction to object oriented programming with Python Chris Angelico <rosuav@gmail.com> - 2012-08-07 08:44 +1000
OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-06 17:23 +0100
Re: OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 09:44 +0000
Re: OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 11:23 +0100
csiph-web