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
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
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 classes,
On Thu, Jun 18, 2015 at 1:03 PM, Fabien fabien.mauss...@gmail.com 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
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 classes,
Todd toddr...@gmail.com:
On Thu, Jun 18, 2015 at 1:03 PM, Fabien fabien.mauss...@gmail.com 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
El miércoles, 17 de junio de 2015, 22:39:31 (UTC+2), Marko Rauhamaa escribió:
Ned Batchelder n...@nedbatchelder.com:
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
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 refers to
On Thu, Jun 18, 2015 at 9:03 PM, Fabien fabien.mauss...@gmail.com 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()
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
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 . 2015-06-17
Post_By
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
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
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
On Wed, Jun 17, 2015 at 2:21 PM, Jason P. suscrici...@gmail.com 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
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 the
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
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
trivial
On Thu, 18 Jun 2015 06:39 am, Marko Rauhamaa wrote:
Ned Batchelder n...@nedbatchelder.com:
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
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
On 6/17/2015 4:39 PM, Marko Rauhamaa wrote:
Ned Batchelder n...@nedbatchelder.com:
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
On Thu, Jun 18, 2015 at 6:39 AM, Marko Rauhamaa ma...@pacujo.net 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
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,
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
outputs
On Wednesday, June 17, 2015 at 1:39:31 PM UTC-7, Marko Rauhamaa wrote:
Ned Batchelder n...@nedbatchelder.com:
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.
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
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 the
On 17/06/2015 21:39, Marko Rauhamaa wrote:
Ned Batchelder n...@nedbatchelder.com:
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
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 n...@nedbatchelder.com:
TDD is about writing tests as a way to design the best system, and
putting testing at the center of your development workflow. It
In a message of Wed, 17 Jun 2015 23:39:17 +0300, Marko Rauhamaa writes:
Ned Batchelder n...@nedbatchelder.com:
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
Ned Batchelder n...@nedbatchelder.com:
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
conceitos da OOP o Python
implementa que não é suportado pelo Delphi?
A pergunta pode parecer um pouco capciosa, mas temos uma vertente forte de
Delphi na empresa e preciso de argumentos sólidos para expor a área de
desenvolvimento antes de decidirmos qual linguagem iremos adotar para este
novo projeto
dos conceitos da OOP.
Fiquei bastante curioso referente a quais conceitos da OOP o Python
implementa que não é suportado pelo Delphi?
A pergunta pode parecer um pouco capciosa, mas temos uma vertente
forte de
Delphi na empresa e preciso de argumentos sólidos para expor a área
de
desenvolvimento
On 26/06/2014 15:16, Samuel David wrote:
Olá,
python.pt
https://www.facebook.com/python.pt
IRC freenode #python-pt channel
I think :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from
2014-06-27 0:16 GMT+10:00 Samuel David samuel.co...@eos-hoepers.com:
Mas estou com uma dúvida referente ao tópico “Por que eu deveria usar Python
e não insira aqui a sua linguagem favorita?”.
Google Translate tells me you're asking Why use Python instead of
some other language?. (I'm going to
Samuel,
http://groups.google.com/group/python-brasil
On Thu, Jun 26, 2014 at 12:18 PM, Chris Angelico ros...@gmail.com wrote:
2014-06-27 0:16 GMT+10:00 Samuel David samuel.co...@eos-hoepers.com:
Mas estou com uma dúvida referente ao tópico “Por que eu deveria usar
Python
e não insira
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 are typically
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
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.
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
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. Neither
Paul Rubin wrote:
Maybe we can concoct a cross between Python and Haskell, and call it
Paskell after the philosopher Blaise ;-).
No, we name it after Pascall's confectionery:
http://www.homesick-kiwi.com/productpage.php?id=51
Lots of syntactic sugar. :-)
--
Greg
--
John Nagle wrote:
The Pascal/Ada/Modula family of languages all had type systems
with restrictions on conversion. Unlike C, types in Pascal
are not simply abbreviations of the type; they're unique types.
Ada is the only one of those that would let you
define things like a new kind of
On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote:
A type system doesn't help. So what if they're both floats? The test
is still bogus, your code will still wait too long to engage the
retro-rockets, and the billion dollar space craft will still be travelling
at hundreds of miles an
Steven D'Aprano [EMAIL PROTECTED] writes:
Multi-Level-Specification allows you to
express physical quantities with their respective unit, and operations
on them to yield the combined unit at compile-time. There are some
rather complicated cases where simple unification won't solve the
On Thu, 01 Mar 2007 21:53:09 -0800, Paul Rubin wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
That still sounds like an unreliable manual type system,
It's unreliable in the sense that the coder has to follow the naming
convention, and must have some bare minimum of sense. If your coders
Steven D'Aprano [EMAIL PROTECTED] writes:
Unless there is a type system that can automatically deal with the
semantic difference between (say) screen coordinates and window
coordinates, or between height and width, or safe and unsafe strings, the
coder still has to deal with it themselves.
Steven D'Aprano wrote:
On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote:
A type system doesn't help. So what if they're both floats? The test
is still bogus, your code will still wait too long to engage the
retro-rockets, and the billion dollar space craft will still be travelling
A type system doesn't help. So what if they're both floats? The test
is still bogus, your code will still wait too long to engage the
retro-rockets, and the billion dollar space craft will still be travelling
at hundreds of miles an hour when it reaches the surface of Mars.
A type system
On 2 mar, 05:14, Steven D'Aprano [EMAIL PROTECTED]
wrote:
On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote:
As a side note : hungarian notation is usually considered bad form here.
Look here for usual naming conventions:
http://www.python.org/dev/peps/pep-0008/
Which Hungarian
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly recognise that there's a problem.
all civilized nations but one use metric systems. Of course there is a
problem if you spot inches somewhere.
Harald
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 2, 4:47 am, Steven D'Aprano [EMAIL PROTECTED]
wrote:
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
But if you used Apps Hungarian, and saw this line of code:
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly
Hi
I am working on a python app, an outliner(a window with a TreeCtrl
on the
left to select a document, and a RichTextBox at the right to edit the
current
doc).
I am familiarized with OOP concepts and terms but I lack practical
experience
, so any comment/tip/pointer to docs will be
[EMAIL PROTECTED] a écrit :
Hi
I am working on a python app, an outliner(a window with a TreeCtrl
on the
left to select a document, and a RichTextBox at the right to edit the
current
doc).
I am familiarized with OOP concepts and terms but I lack practical
experience
, so any
On Mar 1, 9:45 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
As a side note : hungarian notation is usually considered bad form here.
Look here for usual naming
conventions:http://www.python.org/dev/peps/pep-0008/
Thanks for the tip. It's been too many years of VB6, and its difficult
to
[EMAIL PROTECTED] a écrit :
On Mar 1, 9:45 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
I understand (I've been in wikipedia :-) ). Right now the Frame is the
controller as well
as the view.
Yeps. Note that this is a common simplification of the MVC - Microsoft
labelled it
On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote:
As a side note : hungarian notation is usually considered bad form here.
Look here for usual naming conventions:
http://www.python.org/dev/peps/pep-0008/
Which Hungarian notation do you mean?
If you mean the Windows Systems
Steven D'Aprano [EMAIL PROTECTED] writes:
But if you used Apps Hungarian, and saw this line of code:
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly recognise that there's a problem. Comparing
a height in millimetres to a height in inches is not a good thing to do,
no
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
But if you used Apps Hungarian, and saw this line of code:
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly recognise that there's a problem. Comparing
a height in
Steven D'Aprano wrote:
A type system doesn't help. So what if they're both floats? The test
is still bogus, your code will still wait too long to engage the
retro-rockets, and the billion dollar space craft will still be travelling
at hundreds of miles an hour when it reaches the surface of
Steven D'Aprano [EMAIL PROTECTED] writes:
That still sounds like an unreliable manual type system,
It's unreliable in the sense that the coder has to follow the naming
convention, and must have some bare minimum of sense. If your coders are
morons, no naming convention will save you. (For
Ben C wrote:
On 2006-04-11, Michele Simionato [EMAIL PROTECTED] wrote:
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. Yes, you can bypass this if you
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 program
Michele Simionato wrote:
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. Yes, you can bypass this if you really want to, but then
again, you can bypass
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
manually - yuck)
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
programmer
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
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. Yes, you can bypass this if you really want to, but then
again, you can bypass private in C++ too.
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.
Any
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
On 2006-04-11, Michele Simionato [EMAIL PROTECTED] wrote:
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. Yes, you can bypass this if you really want to,
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, etc
Michele Simionato wrote:
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. Yes, you can bypass this if you really want to, but then
again, you can
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
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
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)
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 variable in
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(object):
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.
You
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
Steven D'Aprano wrote:
On Fri, 30 Dec 2005 20:00:51 -0500, Mike Meyer wrote:
The other way I thought of is to create a separate class that consists
of the variables and to use the
from file name import *
in all of the files (namespaces) where it is needed.
Except for one
On Sun, 01 Jan 2006 06:48:48 -0800, Kay Schluehr wrote:
Agree about from module import * being bad, but it is still generally poor
practice for the same reason using global variables is generally poor
practice.
No, I don't think so. The general wisdom is that global variables are
bad not
On Sat, 31 Dec 2005 21:21:29 +, Dennis Lee Bieber wrote:
On Sat, 31 Dec 2005 11:37:38 +1100, Steven D'Aprano
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
Do you mean something like this?
# Module care_and_feeding
import birds
import foods
def feed_my_pet():
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 ' ;
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 instance new as a
(addendum) ... And even ...
eval(t).max()
12
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have questions about global variables in OOP (in general) and Python
(in specific). I understand (I think) that global variables are
generally not a good idea. However, if there are variables that need to
be accessed by a number of classes that exists in separate namespaces
(files),
On Fri, 30 Dec 2005 15:03:54 -0800, newbie wrote:
Hello,
I have questions about global variables in OOP (in general) and Python
(in specific). I understand (I think) that global variables are
generally not a good idea. However, if there are variables that need to
be accessed by a number
newbie [EMAIL PROTECTED] writes:
So far, I have approached the problem by making the variables
attributes of one class and passing instances of the class as variables
to the other class' methods.
That's the standard way to do it in OO languages.
The other way I thought of is to create a
newbie wrote:
Hello,
I have questions about global variables in OOP (in general) and Python
(in specific). I understand (I think) that global variables are
generally not a good idea. However, if there are variables that need to
be accessed by a number of classes that exists in separate
Gary Herron said unto the world upon 30/12/05 08:03 PM:
newbie wrote:
Hello,
I have questions about global variables in OOP (in general) and Python
(in specific). I understand (I think) that global variables are
generally not a good idea. However, if there are variables that need to
be
On Fri, 30 Dec 2005 20:00:51 -0500, Mike Meyer wrote:
The other way I thought of is to create a separate class that consists
of the variables and to use the
from file name import *
in all of the files (namespaces) where it is needed.
Except for one detail, this is a Pythonesque method.
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
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
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
96 matches
Mail list logo