Re: Handing a number of methods to the same child class

2005-01-11 Thread Steven Bethard
Dave Merrill wrote: Somewhat silly example: I know you've hedged this by calling it a "silly" example, but I would like to point out that your set_X methods are unnecessary -- since Python allows you to overload attribute access, getters and setters are generally unnecessary. class Address:

Handing a number of methods to the same child class

2005-01-10 Thread Dave Merrill
Python newb here. Say a class contains some rich attributes, each defined as a class. If an instance of the parent class recieves a call to a method belonging to one of those attributes, it should be dispatched to the corresponding child class. Somewhat silly example: class Address: def __ini