You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems too restrictive me. Without the 'if' it would try to read the file from disk, and if that fails check if there is a loader, without a loader it returns [], so there would not be any behaviour change for non-loader modules if the 'if' was removed, only an additional disk access.
I suggest to remove the 'if'.
Workaround: Don't use '<>' for the dummy file name, but I've read somewhere that those '<>' are a convention for such use-cases.
Maybe the logic needs to be reordered: look for a loader first, before looking for a file on disk. It seems to me the current lookup order might itself be a bug.
Note that the code is the same in python3, so the issue exists there as well.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: