Larry Bates wrote: [...] > In python it is called duck typing but you don't need separate > constructors: > > def __init__(self, c): > if isinstance(c, int): ...do stuff... > elif isinstance(c, list): ...do stuff... > elif isinstance(c, tuple): ...do stuff... > else: > . > . > . > > Remember Python doesn't care what c is and doesn't do > type checking so you can do anything you want. >
Thanx for the info. /Lennart > -Larry Bates -- http://mail.python.org/mailman/listinfo/python-list