What's the best way to write this base class?
John Salerno
johnjsal at gmail.com
Sat Jun 18 12:26:39 EDT 2011
More information about the Python-list mailing list
Sat Jun 18 12:26:39 EDT 2011
- Previous message (by thread): What's the best way to write this base class?
- Next message (by thread): What's the best way to write this base class?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Whew, thanks for all the responses! I will think about it carefully
and decide on a way. I was leaning toward simply assigning the health,
resource, etc. variables in the __init__ method, like this:
def __init__(self, name):
self.name = name
self.health = 50
self.resource = 10
I never did like the idea of using the parameters if I never intended
to pass them in...just seems wrong. :)
The idea of not using a base Character class at all threw me for a
loop though, so I need to think about that too!
- Previous message (by thread): What's the best way to write this base class?
- Next message (by thread): What's the best way to write this base class?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list