[PEP 451] Fix a ModuleSpec attribute (parent) that was named inconsistently in different parts.

This commit is contained in:
Eric Snow 2013-10-22 21:27:10 -06:00
parent 3cc4e26a24
commit 7dcf9d7527
1 changed files with 2 additions and 2 deletions

View File

@ -502,7 +502,7 @@ On ModuleSpec On Modules
========================== ============== ========================== ==============
name __name__ name __name__
loader __loader__ loader __loader__
package __package__ parent __package__
origin __file__* origin __file__*
cached __cached__*,** cached __cached__*,**
submodule_search_locations __path__** submodule_search_locations __path__**
@ -513,7 +513,7 @@ has_location \-
| \* Set on the module only if spec.has_location is true. | \* Set on the module only if spec.has_location is true.
| \*\* Set on the module only if the spec attribute is not None. | \*\* Set on the module only if the spec attribute is not None.
While package and has_location are read-only properties, the remaining While parent and has_location are read-only properties, the remaining
attributes can be replaced after the module spec is created and even attributes can be replaced after the module spec is created and even
after import is complete. This allows for unusual cases where directly after import is complete. This allows for unusual cases where directly
modifying the spec is the best option. However, typical use should not modifying the spec is the best option. However, typical use should not