Message166528
For discussion purposes, I'd like to mention an alternate approach. (I haven't yet formed an opinion on what approach is preferable.)
Python's built-in print() function accepts more than just a 'file' keyword argument:
http://docs.python.org/dev/library/functions.html#print
In addition, because adding a stream argument would require modifying the signatures of three different methods, adding a stream argument might not set us on the right path if we'd like to add support for more arguments to print() in the future (or add additional methods that print output alongside the existing reporting methods).
Another approach is to add a print() method to the dircmp class and have the report methods call self.print() instead of print(). With this approach, callers wanting a different output stream could subclass dircmp and override the print method. This approach also seems like it would offer more flexibility. |
|
Date |
User |
Action |
Args |
2012-07-26 23:25:36 | chris.jerdonek | set | recipients:
+ chris.jerdonek, eli.bendersky |
2012-07-26 23:25:35 | chris.jerdonek | set | messageid: <1343345135.97.0.0991632776911.issue15454@psf.upfronthosting.co.za> |
2012-07-26 23:25:35 | chris.jerdonek | link | issue15454 messages |
2012-07-26 23:25:35 | chris.jerdonek | create | |
|