Chris Jerdonek <chris.jerdo...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15454>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to