John Salerno wrote: > Let's pretend I'm creating an Employee class, which I will later > subclass for more specific jobs.
Let's pretend it might be a good design... <g> > Each instance will have stuff like a > name, title, degrees held, etc. etc. > > So I'm wondering, is the best way to get all this information into the > object to just have a really long __init__ method that takes each argument? what about optional arguments ? class Employee(object): def __init__(self, id, name, **kw): self.id = id self.name = name self.titles = kw.get('titles', []) self.birthdate = kw.get(birthdate, None) # etc > Does a question like this depend on how the class will be used? I don't think it would make sens to design anything without any hint about how it's supposed to be used. My 2 cents -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list