On Fri, Oct 01, 2004 at 10:55:00AM -0700, Shalabh Chaturvedi wrote: > Also, I thought of subclassing StaticDirectory but the only reason I > couldn't is because the following code in _q_lookup(): > > item = self.__class__(item_filepath, self.use_cache, > self.list_directory, > self.follow_symlinks, self.cache_time, > self.file_class) > > Here a new directory object is created using the parameters of the self > object. For a subclass, the parameters of __init__() are different, and > this line needs to be changed to pass the new parameters. If we instead > implement this as: > > item = self.new_directory(item_filepath) > > and: > > def new_directory(self, item_filepath): > return self.__class__(item_filepath, > self.use_cache, > self.list_directory, > self.follow_symlinks, self.cache_time, > self.file_class) > > then not only I could implement my requirement as a subclass, but others > too might add what they need by subclassing. Do you think this is better? +0.5 Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.