On 18 déc 2008, 13:51, Jason Scheirer <jason.schei...@gmail.com> wrote:
> I'd say it's fine but breaking up the statement once or twice is a > good idea just because if one of the function calls in this nested > thing throws an exception, a smaller statement with fewer calls makes > for a far more readable traceback. And I hope that this whole > statement all lives inside of a method in the same x class, or is a > higher-level class that makes use of this behavior? If not, you may > want to consider doing so. > > class X(object): > @property > def todays_filepattern(self): > return self.match_filename( > self.determine_filename_pattern( > datetime.datetime.now())) > def validate_todays_files(self): > return self.validate_output(self.find_text > (self.todays_filepattern)) Thanks for this lesson in application design. Just what I was looking for. -- http://mail.python.org/mailman/listinfo/python-list