[Python-Dev] Backward compatibility of shutil.rmtree

"Martin v. Löwis" martin at v.loewis.de
Sun May 20 19:49:20 CEST 2012


> Two of them differ in the new version: os.fwalk() is used instead of
> os.listdir() and os.unlinkat() instead of os.remove().

It would be os.flistdir instead of os.listdir, not os.fwalk, right?

The way this interface is defined, it's IMO best to do "precise"
reporting, i.e. pass the exact function that caused the failure.
I'd weaken the documentation to just specify that the error-causing
function is reported, indicating that the exact set of functions
may depend on the operating system and change across Python versions.

Regards,
Martin


More information about the Python-Dev mailing list