mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-98139: enhance namespace package repr
This commit is contained in:
parent
2db55e0c00
commit
bd221c01dd
3 changed files with 7 additions and 1 deletions
|
@ -580,7 +580,7 @@ def _module_repr_from_spec(spec):
|
|||
if spec.loader is None:
|
||||
return f'<module {name!r}>'
|
||||
else:
|
||||
return f'<module {name!r} ({spec.loader!r})>'
|
||||
return f'<module {name!r} (namespace) from {list(spec.loader._path)}>'
|
||||
else:
|
||||
if spec.has_location:
|
||||
return f'<module {name!r} from {spec.origin!r}>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue