KraftDiner wrote:

> This is not working the way I think it should....
> it would appear that fromfile and getName are calling the baseClass
> methods which are
> simple passes.... What have I done wrong?
> 
> class baseClass:
>       def __init__(self, type):
>               if type == 'A':
>                       self = typeA()
>               else:
>                       self = typeB()

__init__ is not a constructor, and assigning to self doesn't change the 
type of the constructed object.

looks like you need to get a better tutorial.

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to