A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-April/144063.html below:

[Python-Dev] pathlib - current status of discussions

[Python-Dev] pathlib - current status of discussions [Python-Dev] pathlib - current status of discussionsChris Angelico rosuav at gmail.com
Wed Apr 13 15:24:35 EDT 2016
On Thu, Apr 14, 2016 at 3:10 AM, Brett Cannon <brett at python.org> wrote:
> https://gist.github.com/brettcannon/b3719f54715787d54a206bc011869aa1 has the
> four potential approaches implemented (although it doesn't follow the
> "separate functions" approach some are proposing and instead goes with the
> allow_bytes approach I originally proposed).

All of them have this construct:

try:
    path = path.__fspath__()
except AttributeError:
    pass

Is that the intention, or should the exception catching be narrower? I
know it's clunky to write it in Python, but AIUI it's less so in C:

try:
    callme = path.__fspath__
except AttributeError:
    pass
else:
    path = callme()

ChrisA
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4