This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, eli.bendersky
Date 2012-07-26.23:25:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343345135.97.0.0991632776911.issue15454@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-07-26 23:25:36chris.jerdoneksetrecipients: + chris.jerdonek, eli.bendersky
2012-07-26 23:25:35chris.jerdoneksetmessageid: <1343345135.97.0.0991632776911.issue15454@psf.upfronthosting.co.za>
2012-07-26 23:25:35chris.jerdoneklinkissue15454 messages
2012-07-26 23:25:35chris.jerdonekcreate