[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations -- version 2
p.f.moore at gmail.com
Sun Mar 18 13:55:32 EDT 2018
On 18 March 2018 at 14:44, Barry Scott <barry at barrys-emacs.org> wrote:
> It seems that the main quest to answer first is this.
> Should Path() have methods to access all file operations?
No, (Counterexample, having a Path operation to set Windows ACLs for a path).
> Maybe it was a mistake to add the ones that are already there.
Seems unlikely, as Path objects are pretty useful in their current
form. Even if it were, in some cases, backward compatibility dictates
keeping them so who cares?
> Especially in light of the fspath protocol that now exists.
Again, *maybe* the arguments for some of the existing methods were
weakened by the existence of the fspath protocol, but not enough to
override backward compatibility, so who cares?
> If yes proceed to details the methods and their semantics.
Not applicable, see above.
> If no then concentrate on making shutil etc easy to use this Path() args.
Wrong conclusion - just because it shouldn't have methods for *all*
doesn't imply that *nothing* new warrants being a Path method. Just
that cases should be considered on their individual merits.
> Maybe do this anyway.
Certainly this is a reasonable thing to propose, Probably doesn't even
need much discussion, an issue on bpo should be sufficient.
More information about the Python-ideas