> Yes I believe so but in fromfile I want to call the appropriate > method depending on the in a parameter in fromfile... > like: > class baseClass: > def fromfile(self, fileObj, byteOrder=None, explicit=False): > if explicit: > call fromfile of explicit class > else: > call fromfile of implicit class
class baseClass: def fromfile(self, fileObj, **kwargs): raise NotImplementedError() class implicitClass: def fromfile(self, fileObj, **kwargs): byteOrder = kwargs.get('byteOrder', None) # do something class explicitClass: def fromfile(self, fileObj, **kwargs): # do something -- http://mail.python.org/mailman/listinfo/python-list