GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — GH-78722: Raise exceptions from `pathlib.Path.iterdir()` without delay. by barneygale · Pull Request #107320 · python/cpython Conversation
|
|
Wow. I'd forgotten I'd reviewed this change (or at least endorsed the proposal) when I was caught by surprise in jaraco/develop#26 (then #129871). That code was relying on the lazy exception behavior. I ended up working around the issue by relying on glob instead of iterdir to get the lenient behavior back. I don't see any mention of this change in "what's new for Python 3.13". Maybe there should be a mention of it. I'm now also a little skeptical of the value of this change. It shows that there are at least some cases where people might be relying on the late resolution of the error. We can discuss in the new issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
In Python 3.13, `iterdir()` raises exceptions immediately instead of lazily. This change forces early evaluation to ensure consistent behavior across Python versions. Ref: python/cpython#107320
In Python 3.13, `iterdir()` raises exceptions immediately instead of lazily. This change forces early evaluation to ensure consistent behavior across Python versions. Ref: python/cpython#107320
In Python 3.13, `iterdir()` raises exceptions immediately instead of lazily. This change forces early evaluation to ensure consistent behavior across Python versions. Ref: python/cpython#107320
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.