Re: Looking for a good introduction to object oriented programming with Python

2012-08-09 Thread lipska the kat
On 09/08/12 03:59, Dennis Lee Bieber wrote: On Wed, 08 Aug 2012 20:31:57 +0100, lipska the kat declaimed the following in gmane.comp.python.general: [snip] If a "node" is a father or mother, and it takes one of each to produce a "leaf", your "tree" has just collapsed. This would

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread Chris Angelico
On Thu, Aug 9, 2012 at 3:28 AM, Steven D'Aprano wrote: > (As they say: I'll believe that corporations are people when Texas > executes one.) If proper excuse you can trump any, You may wind up a Limited Company You cannot conveniently blow it up! -- WS Gilbert, "Utopia, Ltd" But not every "is-a

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread Ifthikhan Nazeem
Who could have predicted that a request for suggesting books on OOP can come so far! On Wed, Aug 8, 2012 at 9:31 PM, lipska the kat wrote: > On 08/08/12 17:42, Dennis Lee Bieber wrote: > >> On Wed, 08 Aug 2012 10:51:45 +0100, lipska the kat >> declaimed the following in >> gmane.comp.python.ge

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread lipska the kat
On 08/08/12 17:42, Dennis Lee Bieber wrote: On Wed, 08 Aug 2012 10:51:45 +0100, lipska the kat declaimed the following in gmane.comp.python.general: The point I'm obviously struggling to make is that words convey concepts The word Person conveys a whole lifetime of experience of People and a

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread Steven D'Aprano
On Wed, 08 Aug 2012 09:27:40 -0700, rusi wrote: > I once sat for a presentation of a wannabe university teacher. The > subject she chose was object-orientation. > > She spent some time on the usual dope about employee, manager etc. > Finally she reached the base-class: Person. > > Or so we thoug

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread rusi
On Aug 8, 2:51 pm, lipska the kat wrote: > The point I'm obviously struggling to make is that words convey concepts > The word Person conveys a whole lifetime of experience of People and as > imperfect human beings many of us are unable to tease out 'bits of being > a person' that are relevant to

Re: Looking for a good introduction to object oriented programming with Python

2012-08-08 Thread lipska the kat
On 07/08/12 22:57, Chris Angelico wrote: On Wed, Aug 8, 2012 at 3:00 AM, lipska the kat wrote: I'm still undecided over the whole 'User' thing actually, [snip] This makes little sense to my mind. If you can have a "class User:", why can you not have a "class Person:" ? User and Person are

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread alex23
On Aug 8, 12:14 pm, Steven D'Aprano wrote: > You claim that named Patterns simplify and clarify communication. If you > have to look the terms up, they aren't simplifying and clarifying > communication, they are obfuscating it. By that argument, an encyclopaedia is useless because if you have to

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Chris Angelico
On Wed, Aug 8, 2012 at 12:14 PM, Steven D'Aprano wrote: > NoneType raises an error if you try to create a second instance. bool > just returns one of the two singletons (doubletons?) again. > > py> type(None)() > Traceback (most recent call last): > File "", line 1, in > TypeError: cannot creat

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Steven D'Aprano
On Tue, 07 Aug 2012 17:07:59 -0700, alex23 wrote: >> I'm pretty sure that people could talk about good coding design before >> the Gof4. As you say, they didn't invent the patterns. So people >> obviously wrote code, and talked about algorithms, without the Gof4 >> terminology. > > So what did pe

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread alex23
On Aug 8, 5:02 am, Steven D'Aprano wrote: > I haven't read the Gang of Four book itself, but I've spent plenty of > time being perplexed by over-engineered, jargon-filled code, articles, > posts and discussions by people who use Design Patterns as an end to > themselves rather than a means to an e

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Terry Reedy
On 8/7/2012 3:02 PM, Steven D'Aprano wrote: On Sun, 05 Aug 2012 19:44:31 -0700, alex23 wrote: I think you've entirely missed the point of Design Patterns. Perhaps I have. Or perhaps I'm just (over-)reacting to the abuse of Patterns: http://c2.com/cgi/wiki?DesignPatternsConsideredHarmful or

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Chris Angelico
On Wed, Aug 8, 2012 at 3:00 AM, lipska the kat wrote: > I'm still undecided over the whole 'User' thing actually, I don't think I > can see a time when I will have a User Class in one of my systems but as I > don't want to get 'dogmatic' about this I remain open to any ideas that > might include s

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Steven D'Aprano
On Sun, 05 Aug 2012 19:44:31 -0700, alex23 wrote: > I think you've entirely missed the point of Design Patterns. Perhaps I have. Or perhaps I'm just (over-)reacting to the abuse of Patterns: http://c2.com/cgi/wiki?DesignPatternsConsideredHarmful or maybe I'm just not convinced that Design Patt

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread lipska the kat
On 07/08/12 16:04, rusi wrote: On Aug 7, 7:34 pm, lipska the kat wrote: Never thought so for a moment, good to know you can be reasonable as well as misguided ;-) Well Lipska I must say that I find something resonant about the 'no- person' thing, though I am not sure what. You also said som

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread rusi
On Aug 7, 7:34 pm, lipska the kat wrote: > > Never thought so for a moment, good to know you can be reasonable as > well as misguided ;-) Well Lipska I must say that I find something resonant about the 'no- person' thing, though I am not sure what. You also said something about 'user' being more

Re: OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python)

2012-08-07 Thread lipska the kat
On 07/08/12 10:44, Steven D'Aprano wrote: On Mon, 06 Aug 2012 17:23:19 +0100, lipska the kat wrote: On 06/08/12 13:19, rusi wrote: I suggest this http://steve-yegge.blogspot.in/2006/03/execution-in-kingdom-of- nouns.html http://bpfurtado.livejournal.com/2006/10/21/ Unfortunately the aut

Re: OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python)

2012-08-07 Thread Steven D'Aprano
On Mon, 06 Aug 2012 17:23:19 +0100, lipska the kat wrote: > On 06/08/12 13:19, rusi wrote: >> I suggest this >> http://steve-yegge.blogspot.in/2006/03/execution-in-kingdom-of- nouns.html > > http://bpfurtado.livejournal.com/2006/10/21/ Unfortunately the author (Bruno Furtado) has missed the poi

Re: Looking for a good introduction to object oriented programming with Python

2012-08-07 Thread Mark Lawrence
On 07/08/2012 02:12, Steven D'Aprano wrote: On Mon, 06 Aug 2012 17:17:33 +0100, Mark Lawrence wrote: Please see my comment at the bottom hint hint :) Please trim unnecessary quoted text. We don't need to see the entire thread of comment/reply/reply-to-reply duplicated in *every* email. P

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Ben Finney
Steven D'Aprano writes: > Please trim unnecessary quoted text. > > We don't need to see the entire thread of comment/reply/reply-to-reply > duplicated in *every* email. s/every/any/ -- \ “If you make people think they're thinking, they'll love you; | `\ but if you really make th

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Steven D'Aprano
On Mon, 06 Aug 2012 17:17:33 +0100, Mark Lawrence wrote: > Please see my comment at the bottom hint hint :) Please trim unnecessary quoted text. We don't need to see the entire thread of comment/reply/reply-to-reply duplicated in *every* email. -- Steven -- http://mail.python.org/mailman/l

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Chris Angelico
On Tue, Aug 7, 2012 at 2:34 AM, rusi wrote: > BTW in "automatic garbage collection" which of the three words is most > important? Least? Most important is "garbage". I sure don't want any language I use to automatically collect non-garbage!! But in seriousness, the definition of "garbage" is one

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread rusi
On Aug 6, 7:27 pm, lipska the kat wrote: > You take out the garbage. > I've got automatic garbage collection :-) BTW in "automatic garbage collection" which of the three words is most important? Least? Heres another take on nouns (and therefore OO): http://hilgart.org/enformy/dma-verb.htm --

OT probably but still relevant (was Re: Looking for a good introduction to object oriented programming with Python)

2012-08-06 Thread lipska the kat
On 06/08/12 13:19, rusi wrote: On Aug 6, 12:46 am, lipska the kat wrote: On 04/08/12 16:49, Jean Dubois wrote: I'm looking for a good introduction to object oriented programming with Python. snip I suggest this http://steve-yegge.blogspot.in/2006/03/execution-in-kingdom-of-nouns.html

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Mark Lawrence
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): '''Sam

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Ramchandra Apte
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

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Jean Dubois
On 5 aug, 20:28, Mark Lawrence 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,

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread lipska the kat
On 06/08/12 13:19, rusi wrote: On Aug 6, 12:46 am, lipska the kat wrote: On 04/08/12 16:49, Jean Dubois wrote: I'm looking for a good introduction to object oriented programming with Python. Object Oriented programming is a mindset, a way of looking at that particular part of our world t

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread Roy Smith
In article , lipska the kat wrote: > UML works, non technical 'stakeholders' (yuk) can understand it at a > high level and in my HUMBLE opinion the sequence diagram is the single > most important piece of documentation in the entire software project Yup. Sequence diagrams are the most common

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread rusi
On Aug 6, 12:46 am, lipska the kat wrote: > On 04/08/12 16:49, Jean Dubois wrote: > > > I'm looking for a good introduction to object oriented programming > > with Python. > > Object Oriented programming is a mindset, a way of looking at that > particular part of our world that you are trying to

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread DJC
On 06/08/12 02:27, Steven D'Aprano wrote: On Sun, 05 Aug 2012 19:12:35 -0400, Roy Smith wrote: Good lord. I'd rather read C++ than UML. And I can't read C++. UML is under-rated. I certainly don't have any love of the 47 different flavors of diagram, but the basic idea of having a common gra

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread lipska the kat
On 06/08/12 01:27, Steven D'Aprano wrote: On Sun, 05 Aug 2012 19:12:35 -0400, Roy Smith wrote: Good lord. I'd rather read C++ than UML. And I can't read C++. UML is under-rated. I certainly don't have any love of the 47 different flavors of diagram, but the basic idea of having a common gra

Re: Looking for a good introduction to object oriented programming with Python

2012-08-06 Thread lipska the kat
On 05/08/12 23:51, Steven D'Aprano wrote: On Sun, 05 Aug 2012 18:45:47 -0400, Dennis Lee Bieber wrote: 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).

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Wolfgang Strobl
Dennis Lee Bieber : > 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). Well, C++ did to C what Simula 67 did to Algol 60, much earlier. Simula was

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread alex23
On Aug 6, 10:22 am, Steven D'Aprano wrote: > In my not-so-humble opinion, the popularity of Design Patterns has a lot > to do with the fact that they are so abstract and jargon-ridden that they > have become a badge of membership into an elite. Shorn of their excessive > abstractness, they're not

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Dan Sommers
On 2012-08-06 at 00:27:43 +, Steven D'Aprano wrote: > I frequently draw diagrams to understand the relationships between my > classes and the problem I am trying to solve. I almost invariably use one > type of box and one type of arrowhead. Sometimes if I'm bored I draw > doodles on the di

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Steven D'Aprano
On Sun, 05 Aug 2012 19:12:35 -0400, Roy Smith wrote: >> Good lord. I'd rather read C++ than UML. And I can't read C++. > > UML is under-rated. I certainly don't have any love of the 47 different > flavors of diagram, but the basic idea of having a common graphical > language for describing how

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Mark Lawrence
On 06/08/2012 00:12, Roy Smith wrote: In article <501ef904$0$29867$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: On Sun, 05 Aug 2012 18:45:47 -0400, Dennis Lee Bieber wrote: Don't look for Object-Oriented Programming -- since the first widely popular OOP language was C++ (Sma

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Roy Smith
In article <501ef904$0$29867$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > On Sun, 05 Aug 2012 18:45:47 -0400, Dennis Lee Bieber wrote: > > > Don't look for Object-Oriented Programming -- since the first widely > > popular OOP language was C++ (Smalltalk was earlier, but rather

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Steven D'Aprano
On Sun, 05 Aug 2012 18:45:47 -0400, Dennis Lee Bieber wrote: > 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 An

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Mark Lawrence
On 05/08/2012 19:43, Ifthikhan Nazeem wrote: [top posting fixed] On Sun, Aug 5, 2012 at 8:28 PM, Mark Lawrence 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) objec

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Ifthikhan Nazeem
I would recommend Bruce Eckel's Thining in Python. Check it out here http://www.mindview.net/Books/TIPython/ On Sun, Aug 5, 2012 at 8:28 PM, Mark Lawrence 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 diff

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Roy Smith
In article <8f1b60a5-0411-4aae-9ee6-0025b493c...@m13g2000vbd.googlegroups.com>, Jean Dubois wrote: > Can someone here on this list give a trivial example of what object > oriented programming is, using only Python? OOP seems to mean different things to different people. What OOP means to you

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Mark Lawrence
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 'do

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Jean Dubois
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 ca

Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Jean Dubois
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 ca