What's the best way to write this base class?
Chris Angelico
rosuav at gmail.com
Sat Jun 18 00:53:50 EDT 2011
More information about the Python-list mailing list
Sat Jun 18 00:53:50 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 ]
On Sat, Jun 18, 2011 at 2:17 PM, John Salerno <johnjsal at gmail.com> wrote: > 1) > class Character: > > def __init__(self, name, base_health=50, base_resource=10): > self.name = name > self.health = base_health > self.resource = base_resource If you expect to override the health/resource, I'd use this model. ChrisA
- 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