Initializing a subclass with a super object?

Terry terry.yinzhe at gmail.com
Sat May 10 19:39:56 EDT 2008


On May 11, 7:22 am, frankdmarti... at gmail.com wrote:
> Class A inherits from class B.  Can anyone point me in the direction
> of documentation saying how to initialize an object of A, a1, with an
> object of B, b1?

This is called a 'factory'in design patterns. Search 'python factory',
you will get a lot of examples.

br, Terry



More information about the Python-list mailing list