New submission from Barry A. Warsaw <ba...@python.org>:

__spec__ is defined in PEP 451.  If you search for "__spec__" in the docs, you 
get a number of hits.

https://docs.python.org/3/search.html?q=__spec__&check_keywords=yes&area=default

Click on the first link:

https://docs.python.org/3/reference/import.html?highlight=__spec__#__spec__

but that still leaves you scratching your head as to what exactly is in 
__spec__.  If you happen to scroll up a little bit though, you end up here:

https://docs.python.org/3/reference/import.html?highlight=__spec__#module-spec

and then if you follow the link to ModuleSpec, you finally get to here:

https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec

and *that's* where the contents of __spec__ are defined.  Not very discoverable.

I propose just a couple of small documentation fixes to add "__spec__" in both 
of those locations so that a search lands you in a useful place.

----------
assignee: barry
components: Documentation
messages: 304474
nosy: barry
priority: normal
severity: normal
status: open
title: Improve __spec__ discoverability
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31799>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to