Skip to content

bpo-37444: Update differing exception between builtins and importlib #14869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Update documentation for resolve_name
  • Loading branch information
nsiregar committed Jul 23, 2019
commit 223ce2d07a66f46e50c7d21167b10032a0c4f67e
2 changes: 1 addition & 1 deletion Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ an :term:`importer`.
``importlib.util.resolve_name('sys', __package__)`` without doing a
check to see if the **package** argument is needed.

:exc:`ValueError` is raised if **name** is a relative module name but
:exc:`ImportError` is raised if **name** is a relative module name but
package is a false value (e.g. ``None`` or the empty string).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package is a false value (e.g. ``None`` or the empty string).
**package** is a false value (e.g. ``None`` or the empty string).

:exc:`ValueError` is also raised a relative name would escape its containing
package (e.g. requesting ``..bacon`` from within the ``spam`` package).
Expand Down