mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #18864: Add a setter for ModuleSpec.has_location.
This commit is contained in:
parent
85cce1eac7
commit
b282b3d804
5 changed files with 2942 additions and 2920 deletions
|
@ -841,6 +841,10 @@ class ModuleSpec:
|
|||
def has_location(self):
|
||||
return self._set_fileattr
|
||||
|
||||
@has_location.setter
|
||||
def has_location(self, value):
|
||||
self._set_fileattr = bool(value)
|
||||
|
||||
|
||||
def spec_from_loader(name, loader, *, origin=None, is_package=None):
|
||||
"""Return a module spec based on various loader methods."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue