New submission from Chris Jerdonek <[email protected]>:
Currently, the subdirs attribute of filecmp.dircmp does not respect subclassing:
>>> from filecmp import dircmp
>>> class MyDirCmp(dircmp):
... pass
...
>>> my_dcmp = MyDirCmp('dir1', 'dir2')
>>> for item in my_dcmp.subdirs.values():
... print(type(item))
... break
...
<class 'filecmp.dircmp'>
This is the only place where dircmp does not respect subclassing. It can be
corrected here:
def phase4(self): # Find out differences between common subdirectories
...
...
self.subdirs[x] = dircmp(a_x, b_x, self.ignore, self.hide)
This would let one do things like override dircmp.report() and have
dircmp.report_full_closure() behave as expected.
----------
components: Library (Lib)
keywords: easy
messages: 166443
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: Allow dircmp.subdirs to behave well under subclassing
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15450>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com