Re: Classic OOP in Python

2015-11-12 Thread jongiddy
On Thursday, 18 June 2015 12:21:29 UTC+1, Jason P. wrote: > > I'm aware of duck typing. The point in using interfaces is to be explicit > about the boundaries of a system. > > Quite a red "Growing Object-Oriented Software, Guided by Tests", by the way. > In fact interfaces are key components i

Re: Classic OOP in Python

2015-06-21 Thread Laura Creighton
Ah, turns out there was an entry. I updated it. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Classic OOP in Python

2015-06-20 Thread Mark Lawrence
On 19/06/2015 00:01, Laura Creighton wrote: In a message of Thu, 18 Jun 2015 11:50:28 +0100, Mark Lawrence writes: Throw in http://clonedigger.sourceforge.net/ as well and you've a really awesome combination. Mark Lawrence I didn't know about that one. Hey thank you, Mark. Looks great. It

Re: Classic OOP in Python

2015-06-18 Thread Laura Creighton
In a message of Thu, 18 Jun 2015 11:50:28 +0100, Mark Lawrence writes: >Throw in http://clonedigger.sourceforge.net/ as well and you've a really >awesome combination. > >Mark Lawrence > I didn't know about that one. Hey thank you, Mark. Looks great. It needs its own entry in https://wiki.python

Re: Classic OOP in Python

2015-06-18 Thread Cousin Stanley
> > python -m doctest application.py > > And from there, I would build up extra doc tests > An extra doc test that fails #!/usr/bin/env python """ NewsGroup comp.lang.python Subject .. Classic OOP in Python Date ..

Re: Classic OOP in Python

2015-06-18 Thread Ned Batchelder
On Thursday, June 18, 2015 at 7:21:29 AM UTC-4, Jason P. wrote: > El miércoles, 17 de junio de 2015, 21:44:51 (UTC+2), Ned Batchelder escribió: > > On Wednesday, June 17, 2015 at 3:21:32 PM UTC-4, Jason P. wrote: > > > Hello Python community. > > > > > > I come from a classic background in what r

Re: Classic OOP in Python

2015-06-18 Thread Chris Angelico
On Thu, Jun 18, 2015 at 9:03 PM, Fabien wrote: > Would you consider the following kind of program "unpythonic"? > > class MovingObject(object): > """Great doc about what a moving object is""" > > def move(self): > """Great doc about move""" > raise NotImplementedError() > >

Re: Classic OOP in Python

2015-06-18 Thread Marko Rauhamaa
Todd : > On Thu, Jun 18, 2015 at 1:03 PM, Fabien wrote: >> Would you consider the following kind of program "unpythonic"? >> >> class MovingObject(object): >> """Great doc about what a moving object is""" >> >> def move(self): >> """Great doc about move""" >> raise NotImpl

Re: Classic OOP in Python

2015-06-18 Thread Jason P.
El miércoles, 17 de junio de 2015, 22:39:31 (UTC+2), Marko Rauhamaa escribió: > Ned Batchelder : > > > TDD is about writing tests as a way to design the best system, and > > putting testing at the center of your development workflow. It works > > great with Python even without interfaces. > > I

Re: Classic OOP in Python

2015-06-18 Thread Jason P.
El miércoles, 17 de junio de 2015, 21:44:51 (UTC+2), Ned Batchelder escribió: > On Wednesday, June 17, 2015 at 3:21:32 PM UTC-4, Jason P. wrote: > > Hello Python community. > > > > I come from a classic background in what refers to OOP. Mostly Java and PHP > > (> 5.3). I'm used to abstract class

Re: Classic OOP in Python

2015-06-18 Thread Jason P.
El miércoles, 17 de junio de 2015, 21:44:51 (UTC+2), Ned Batchelder escribió: > On Wednesday, June 17, 2015 at 3:21:32 PM UTC-4, Jason P. wrote: > > Hello Python community. > > > > I come from a classic background in what refers to OOP. Mostly Java and PHP > > (> 5.3). I'm used to abstract class

Re: Classic OOP in Python

2015-06-18 Thread Todd
On Thu, Jun 18, 2015 at 1:03 PM, Fabien wrote: > On 06/17/2015 11:16 PM, sohcahto...@gmail.com wrote: > >> You don't need interfaces with Python. Duck typing makes that all >> possible. >> > > Yes, but I also like interfaces (or in python: mimicked interfaces with > NotImplementedError) for thei

Re: Classic OOP in Python

2015-06-18 Thread Fabien
On 06/17/2015 11:16 PM, sohcahto...@gmail.com wrote: You don't need interfaces with Python. Duck typing makes that all possible. Yes, but I also like interfaces (or in python: mimicked interfaces with NotImplementedError) for their clarity and documentation purposes. Would you consider the

Re: Classic OOP in Python

2015-06-18 Thread Mark Lawrence
On 17/06/2015 23:33, Laura Creighton wrote: In a message of Wed, 17 Jun 2015 14:14:34 -0700, Ned Batchelder writes: TDD is supposed to make you brave, not cowards, and it's Ned's most excellent tool http://nedbatchelder.com/code/coverage/ that I recommend to TDD dogmatic cowards. Even if you d

Re: Classic OOP in Python

2015-06-18 Thread Marco Buttu
On 17/06/2015 23:33, sohcahto...@gmail.com wrote: I had a Java class where we had to learn TDD, and that's the way TDD was taught to us, and I hated it. We watched a video of this guy explaining TDD with a hat that was red on the front and green on the back. It involved writing a simple faili

Re: Classic OOP in Python

2015-06-17 Thread Chris Angelico
On Thu, Jun 18, 2015 at 6:39 AM, Marko Rauhamaa wrote: > Another interesting ism I have read about is the idea that the starting > point of any software project should be the user manual. The developers > should then go and build the product that fits the manual. I've seldom met a *user* manual t

Re: Classic OOP in Python

2015-06-17 Thread Terry Reedy
On 6/17/2015 4:39 PM, Marko Rauhamaa wrote: Ned Batchelder : TDD is about writing tests as a way to design the best system, and putting testing at the center of your development workflow. It works great with Python even without interfaces. I use what I might call 'smart TDD'. I think it a mi

Re: Classic OOP in Python

2015-06-17 Thread Steven D'Aprano
On Thu, 18 Jun 2015 06:39 am, Marko Rauhamaa wrote: > Ned Batchelder : > >> TDD is about writing tests as a way to design the best system, and >> putting testing at the center of your development workflow. It works >> great with Python even without interfaces. > > I wonder how great it really is

Re: Classic OOP in Python

2015-06-17 Thread Ned Batchelder
On Wednesday, June 17, 2015 at 6:34:23 PM UTC-4, Laura Creighton wrote: > TDD is supposed to make you brave, not cowards, and it's > Ned's most excellent tool > http://nedbatchelder.com/code/coverage/ > that I recommend to TDD dogmatic cowards. > > Even if you don't want to use TTD, you will enjoy

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 14:14:34 -0700, Ned Batchelder writes: >The true TDD acolytes advocate a very idiosyncratic workflow, it's true. >I don't do this, but I also don't consider myself a TDD person. I value >tests a great deal, and put a lot of effort into them, but I don't write >triv

Re: Classic OOP in Python

2015-06-17 Thread Mark Lawrence
On 17/06/2015 23:09, Laura Creighton wrote: ps -- Marko, we have ample evidence that you are an extremely clever person. But the purpose of TTD is not to make clever code, but wise code. TTD in the hands of a fool will never produce that. But how else do you have to check that your design, whi

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 14:33:43 -0700, sohcahto...@gmail.com writes: >I had a Java class where we had to learn TDD, and that's the way TDD >was taught to us, and I hated it. We watched a video of this guy >explaining TDD with a hat that was red on the front and green on the >back. It i

Re: Classic OOP in Python

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 23:39:17 +0300, Marko Rauhamaa writes: >Ned Batchelder : > >> TDD is about writing tests as a way to design the best system, and >> putting testing at the center of your development workflow. It works >> great with Python even without interfaces. > >I wonder how gre

Re: Classic OOP in Python

2015-06-17 Thread Mark Lawrence
On 17/06/2015 22:33, sohcahto...@gmail.com wrote: On Wednesday, June 17, 2015 at 1:39:31 PM UTC-7, Marko Rauhamaa wrote: Ned Batchelder : TDD is about writing tests as a way to design the best system, and putting testing at the center of your development workflow. It works great with Python ev

Re: Classic OOP in Python

2015-06-17 Thread sohcahtoa82
On Wednesday, June 17, 2015 at 1:39:31 PM UTC-7, Marko Rauhamaa wrote: > Ned Batchelder : > > > TDD is about writing tests as a way to design the best system, and > > putting testing at the center of your development workflow. It works > > great with Python even without interfaces. > > I wonder h

Re: Classic OOP in Python

2015-06-17 Thread sohcahtoa82
On Wednesday, June 17, 2015 at 12:21:32 PM UTC-7, Jason P. wrote: > Hello Python community. > > I come from a classic background in what refers to OOP. Mostly Java and PHP > (> 5.3). I'm used to abstract classes, interfaces, access modifiers and so on. > > Don't get me wrong. I know that despite

Re: Classic OOP in Python

2015-06-17 Thread Ned Batchelder
On Wednesday, June 17, 2015 at 4:39:31 PM UTC-4, Marko Rauhamaa wrote: > The way it was explained to me was that in TDD you actually don't write > code to any requirements or design: you simply do the least to pass the > tests. Thus, say you need to write a program that inputs a string and > output

Re: Classic OOP in Python

2015-06-17 Thread Mark Lawrence
On 17/06/2015 21:39, Marko Rauhamaa wrote: Ned Batchelder : TDD is about writing tests as a way to design the best system, and putting testing at the center of your development workflow. It works great with Python even without interfaces. I wonder how great it really is. Testing is important,

Re: Classic OOP in Python

2015-06-17 Thread Marko Rauhamaa
Ned Batchelder : > TDD is about writing tests as a way to design the best system, and > putting testing at the center of your development workflow. It works > great with Python even without interfaces. I wonder how great it really is. Testing is important, that's for sure, but to make it a dogmat

Re: Classic OOP in Python

2015-06-17 Thread Ned Batchelder
On Wednesday, June 17, 2015 at 3:21:32 PM UTC-4, Jason P. wrote: > Hello Python community. > > I come from a classic background in what refers to OOP. Mostly Java and PHP > (> 5.3). I'm used to abstract classes, interfaces, access modifiers and so on. > > Don't get me wrong. I know that despite

Re: Classic OOP in Python

2015-06-17 Thread Skip Montanaro
On Wed, Jun 17, 2015 at 2:21 PM, Jason P. wrote: > I'm gonna try to develop a modest application from ground up using > TDD. If it had been done in Java for instance, I would made > extensive use of interfaces to define the boundaries of my > system. How would I do something like that in Python?

Classic OOP in Python

2015-06-17 Thread Jason P.
Hello Python community. I come from a classic background in what refers to OOP. Mostly Java and PHP (> 5.3). I'm used to abstract classes, interfaces, access modifiers and so on. Don't get me wrong. I know that despite the differences Python is fully object oriented. My point is, do you know an