[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

Wes Turner wes.turner at gmail.com
Tue Mar 20 04:33:52 EDT 2018


On Tue, Mar 20, 2018 at 4:25 AM, Nathaniel Smith <njs at pobox.com> wrote:

> On Tue, Mar 20, 2018 at 1:03 AM, Wes Turner <wes.turner at gmail.com> wrote:
> > I added trio to the comparison table
> > (Things are mostly just async-wrapped,
> > though pathlib_not_trio does show a few missing methods?).
>
> trio.Path is an automatically generated, exact mirror of pathlib.Path,
> so I don't think it's very useful to have in your table? Also the
> missing attributes are actually handled via __getattr__, so they
> aren't actually missing, they're just invisible to your detection
> mechanism :-)
>
> In [21]: trio.Path("/a/b").anchor
> Out[21]: '/'
>
> In [22]: trio.Path("/a/b").name
> Out[22]: 'b'
>

Ah, good call. Didn't even look.
Is there a reason that the pathlib methods shouldn't just be similarly
async-wrapped?


>
> -n
>
> --
> Nathaniel J. Smith -- https://vorpus.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180320/c719a1e8/attachment.html>


More information about the Python-ideas mailing list