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 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
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
> >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
10 matches
Mail list logo