Re: [Python-Dev] pathlib - current status of discussions

2016年4月13日 12:41:25 -0700

On Wed, Apr 13, 2016 at 3:24 PM, Chris Angelico <[email protected]> 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
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to