Message166443
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. |
|
Date |
User |
Action |
Args |
2012-07-26 00:00:03 | chris.jerdonek | set | recipients:
+ chris.jerdonek |
2012-07-26 00:00:03 | chris.jerdonek | set | messageid: <1343260803.75.0.101432828571.issue15450@psf.upfronthosting.co.za> |
2012-07-26 00:00:03 | chris.jerdonek | link | issue15450 messages |
2012-07-26 00:00:02 | chris.jerdonek | create | |
|