Polymorphism the Python way
danielk at aracnet.com
Sun Aug 31 05:55:30 CEST 2003
Given the following code,,,
def __init__(self, adeadthing):
self.deadthing = adeadthing
def __init__(self, aparrotthing):
self.parrotthing = aparrotthing
...and then somewhere in some script I use...
to get whatever 'thing' I want to get.
Isn't there a better way to do this in Python? I hate doing these
'get' type methods. The seem ugly to me.
More information about the Python-list