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/144065.html below:

[Python-Dev] pathlib - current status of discussions

[Python-Dev] pathlib - current status of discussions [Python-Dev] pathlib - current status of discussionsFred Drake fred at fdrake.net
Wed Apr 13 15:36:12 EDT 2016
On Wed, Apr 13, 2016 at 3:24 PM, Chris Angelico <rosuav at gmail.com> wrote:
> 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()

+1 for this variant; I really don't like masking errors inside the
__fspath__ implementation.


  -Fred

-- 
Fred L. Drake, Jr.    <fred at fdrake.net>
"A storm broke loose in my mind."  --Albert Einstein
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