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
Ah, turns out there was an entry. I updated it.
Laura
--
https://mail.python.org/mailman/listinfo/python-list
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
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
>
> 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 ..
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
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()
>
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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?
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
James Stroud wrote:
> Dick Moores wrote:
>> At 01:27 PM 7/28/2007, Dennis Lee Bieber wrote:
>>
>>> On Fri, 27 Jul 2007 16:27:57 -0700, Dick Moores <[EMAIL PROTECTED]>
>>> declaimed the following in comp.lang.python:
>>>
>>>
Well, the publisher is Prentice Hall, "The world's leading
educat
Dick Moores wrote:
> At 01:27 PM 7/28/2007, Dennis Lee Bieber wrote:
>
>> On Fri, 27 Jul 2007 16:27:57 -0700, Dick Moores <[EMAIL PROTECTED]>
>> declaimed the following in comp.lang.python:
>>
>>
>> > Well, the publisher is Prentice Hall, "The world's leading
>> > educational publisher". Textbooks
At 01:27 PM 7/28/2007, Dennis Lee Bieber wrote:
>On Fri, 27 Jul 2007 16:27:57 -0700, Dick Moores <[EMAIL PROTECTED]>
>declaimed the following in comp.lang.python:
>
>
> > Well, the publisher is Prentice Hall, "The world's leading
> > educational publisher". Textbooks are typically expensive.
> >
>
At 08:41 AM 7/27/2007, Bill wrote:
>Does anyone out there have any information about this book. It's
>listed on Amazon to be published in November of this year. A simple
>Google search (1st page only) doesn't show anything useful, and I
>can't find a reference on the web sites of the authors. Neith
Does anyone out there have any information about this book. It's
listed on Amazon to be published in November of this year. A simple
Google search (1st page only) doesn't show anything useful, and I
can't find a reference on the web sites of the authors. Neither of the
authors appears to be heavily
Gregor Horvath wrote:
> Steven D'Aprano schrieb:
>
>
>>I don't know of many other OO languages that didn't/don't have
>>inheritance,
>
>
> VB4 - VB6
>
VB6 has a kind of inheritance via interface/delegation. The interface
part is for subtyping, the delegation part (which has to be done
manuall
Michele Simionato wrote:
> Roy Smith wrote:
>
>> That being said, you can indeed have private data in Python. Just prefix
>> your variable names with two underscores (i.e. __foo), and they effectively
>> become private. Yes, you can bypass this if you really want to, but then
>> again, you can b
Casey Hawthorne wrote:
>>I think it's important not to wrongly confuse 'OOP' with ''data hiding'
>>or any other aspect you may be familiar with from Java or C++. The
>>primary concept behind OOP is not buzzwords such as abstraction,
>>encapsulation, polymorphism, etc etc, but the fact that your pro
Ben C wrote:
> On 2006-04-11, Michele Simionato <[EMAIL PROTECTED]> wrote:
>
>>Roy Smith wrote:
>>
>>
>>>That being said, you can indeed have private data in Python. Just prefix
>>>your variable names with two underscores (i.e. __foo), and they effectively
>>>become private. Yes, you can bypass
Steven D'Aprano schrieb:
> I don't know of many other OO languages that didn't/don't have
> inheritance,
VB4 - VB6
--
Mit freundlichen Grüßen,
Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
http://www.gregor-horvath.com
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato wrote:
> Roy Smith wrote:
>
> > That being said, you can indeed have private data in Python. Just prefix
> > your variable names with two underscores (i.e. __foo), and they effectively
> > become private. Yes, you can bypass this if you really want to, but then
> > again, you c
On Tue, 11 Apr 2006 18:20:13 +, Casey Hawthorne wrote:
>>I think it's important not to wrongly confuse 'OOP' with ''data hiding'
>>or any other aspect you may be familiar with from Java or C++. The
>>primary concept behind OOP is not buzzwords such as abstraction,
>>encapsulation, polymorphism
On 2006-04-11, Michele Simionato <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
>> That being said, you can indeed have private data in Python. Just prefix
>> your variable names with two underscores (i.e. __foo), and they effectively
>> become private. Yes, you can bypass this if you really wan
>I think it's important not to wrongly confuse 'OOP' with ''data hiding'
>or any other aspect you may be familiar with from Java or C++. The
>primary concept behind OOP is not buzzwords such as abstraction,
>encapsulation, polymorphism, etc etc, but the fact that your program
>consists of objects m
Roy Smith wrote:
(snip)
> That being said, you can indeed have private data in Python. Just prefix
> your variable names with two underscores (i.e. __foo), and they effectively
> become private.
The double-leading-underscore stuff has nothing to do with "privacy".
It's meant to protect from
fyhuang wrote:
> Hello all,
>
> I've been wondering a lot about why Python handles classes and OOP the
> way it does. From what I understand, there is no concept of class
> encapsulation in Python, i.e. no such thing as a private variable.
Seems you're confusing encapsulation with data hiding.
>
Roy Smith wrote:
> That being said, you can indeed have private data in Python. Just prefix
> your variable names with two underscores (i.e. __foo), and they effectively
> become private. Yes, you can bypass this if you really want to, but then
> again, you can bypass private in C++ too.
Wrong,
Ben Sizer wrote:
> I think it's important not to wrongly confuse 'OOP' with ''data hiding'
> or any other aspect you may be familiar with from Java or C++. The
> primary concept behind OOP is not buzzwords such as abstraction,
> encapsulation, polymorphism, etc etc, but the fact that your program
fyhuang wrote:
> It seems to me that it is difficult to use OOP to a wide extent in
> Python code because these features of the language introduce many
> inadvertant bugs. For example, if the programmer typos a variable name
> in an assignment, the assignment will probably not do what the
> program
Hi,
fyhuang schrieb:
> I've been wondering a lot about why Python handles classes and OOP the
> way it does. From what I understand, there is no concept of class
> encapsulation in Python, i.e. no such thing as a private variable. Any
the answer is here:
http://tinyurl.com/obgho
--
Mit freund
fyhuang <[EMAIL PROTECTED]> wrote:
> [ ... ] no such thing as a private variable. Any
>part of the code is allowed access to any variable in any class, and
>even non-existant variables can be accessed: they are simply created.
You're confusing two issues: encapsulation and dynamic name binding.
Yo
Em Seg, 2006-04-10 às 07:19 -0700, fyhuang escreveu:
> class PythonClass:
>private foo = "bar"
>private var = 42
>allow_readwrite( [ foo, var ] )
You are aware that foo and var would become class-variables, not
instance-variables, right?
But you can always do:
class PythonClass(objec
"fyhuang" <[EMAIL PROTECTED]> wrote:
> I've been wondering a lot about why Python handles classes and OOP the
> way it does. From what I understand, there is no concept of class
> encapsulation in Python, i.e. no such thing as a private variable. Any
> part of the code is allowed access to any vari
You can do this in Python as well. Check out the property built-in
function. One can declare a property with a get, set, and delete
method. Here's a small example of a read-only property.
class Test(object):
def getProperty(self):
return 0;
prop = property(fget = getProperty)
Hello all,
I've been wondering a lot about why Python handles classes and OOP the
way it does. From what I understand, there is no concept of class
encapsulation in Python, i.e. no such thing as a private variable. Any
part of the code is allowed access to any variable in any class, and
even non-e
(addendum) ... And even ...
>>> eval("t").max()
12
>>>
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates wrote:
> novice wrote:
> > hello over there!
> > I have the following question:
> > Suppose I created a class: class Point:
> > pass
> > then instanciated an instance: new = Point()
> > So now how to get the insta
novice wrote:
> hello over there!
> I have the following question:
> Suppose I created a class: class Point:
> pass
> then instanciated an instance: new = Point()
> So now how to get the instance new as a string: like ' new '
On Tue, 27 Dec 2005 02:42:18 -0800, novice wrote:
>
> hello over there!
> I have the following question:
> Suppose I created a class: class Point:
> pass
> then instanciated an instance: new = Point()
> So now how to get the
novice schrieb:
> class Point:
>def _func_that_we_want_(self):
> return ...
return self.__class__.__name__
http://docs.python.org/ref/types.html#l2h-109
--
http://mail.python.org/mailman/listinfo/python-list
hello over there!
I have the following question:
Suppose I created a class: class Point:
pass
then instanciated an instance: new = Point()
So now how to get the instance new as a string: like ' new ' ; Is
there any built in
63 matches
Mail list logo