At 03:04 PM 2/16/2005, Brian van den Broek wrote:
Terry Carroll said unto the world upon 2005-02-16 16:18:
On Fri, 11 Feb 2005, Bob Gailer wrote:
Whenever you find yourself writing an if statement ask whether this
would be better handled by subclasses. Whenever you find yourself about
to write a gl
Terry Carroll wrote:
On Fri, 11 Feb 2005, Bob Gailer wrote:
Whenever you find yourself writing an if statement ask whether this
would be better handled by subclasses. Whenever you find yourself about
to write a global statement, consider making the variables properties of
a class.
Bob --
Brian
Terry Carroll said unto the world upon 2005-02-16 16:18:
On Fri, 11 Feb 2005, Bob Gailer wrote:
Whenever you find yourself writing an if statement ask whether this
would be better handled by subclasses. Whenever you find yourself about
to write a global statement, consider making the variables pro
On Fri, 11 Feb 2005, Bob Gailer wrote:
> Whenever you find yourself writing an if statement ask whether this
> would be better handled by subclasses. Whenever you find yourself about
> to write a global statement, consider making the variables properties of
> a class.
Bob --
Brian already asked
s,
Ryan
-Original Message-
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 12, 2005 3:52 AM
To: EJP; Ryan Davis; tutor@python.org
Subject: Re: [Tutor] Larger program organization
> without trying to make this one of those classic threads of great,
> do you f
Bob Gailer said unto the world upon 2005-02-13 10:13:
At 03:21 PM 2/12/2005, Brian van den Broek wrote:
[snip]
> I am curious about Bob's "Whenever you find yourself writing
> an if statement ask whether this would be better handled by subclasses."
Thanks Bob and Alan,
It's quite clear now :-)
B
Bob Gailer wrote:
At 03:21 PM 2/12/2005, Brian van den Broek wrote:
[snip]
> I am curious about Bob's "Whenever you find yourself writing
> an if statement ask whether this would be better handled by subclasses."
class A:
...
class A1(A);
def foo(self, ...):
statements to process object of
At 03:21 PM 2/12/2005, Brian van den Broek wrote:
[snip]
> I am curious about Bob's "Whenever you find yourself writing
> an if statement ask whether this would be better handled by subclasses."
I start out writing a class like:
class A:
def __init__(self, type):
self.type = type
...
def fo
> I am curious about Bob's "Whenever you find yourself writing an if
> statement ask whether this would be better handled by subclasses."
>
> Could you explain a bit more?
One of the basic purposes of OOP is to eliminate if/switch statements
that are conditional on the type of the object being han
Bob Gailer said unto the world upon 2005-02-11 15:34:
At 10:39 AM 2/11/2005, Ryan Davis wrote:
I'm starting to make a code-generation suite in python, customized to
the way we ASP.NET at my company, and I'm having some trouble finding
a good way to organize all the code.
My take on doing that in
Ryan Davis wrote:
I'm starting to make a code-generation suite in python, customized to
the way we ASP.NET at my company, and I'm having some trouble finding a
good way to organize all the code. I keep writing it, but it feels more
and more spaghetti-ish every day.
Organize your code into packa
"Ryan Davis" [EMAIL PROTECTED] wrote
My
background is mostly C#, so I'm used to the ridiculous rigidity of
strongly-typed languages. I have been using python for helper apps for a few
months now, so am pretty familiar with the syntax now, but I don't know any of
the patterns y
> without trying to make this one of those classic threads of great,
> do you feel you could develop fairly complex applications faster
> in Python than in C#/ASP.NET? It's a rhetorical question
> (but I'm interested in your answer as a single data point)
To be honest it wouldn't make a great
> >way we ASP.NET at my company, and I'm having some trouble finding a good
> >way to organize all the code.
>
> My take on doing that in Python:
>
> Organize things into modules. Especially with an eye to potential reuse.
> Look at the module index in the docs to see how most of the "standard"
>
At 10:39 AM 2/11/2005, Ryan Davis wrote:
I'm
starting to make a code-generation suite in python, customized to the way
we ASP.NET at my company, and I'm having some trouble finding a good way
to organize all the code.
My take on doing that in Python:
Organize things into modules. Especially wit
I'm starting to make a code-generation suite in python, customized
to the way we ASP.NET at my company, and I'm having some trouble finding a good
way to organize all the code. I
keep writing it, but it feels more and more spaghetti-ish
every day.
I'm going to look at the other stuff i
16 matches
Mail list logo