From b282b3d804165d704130fabf0f609d5dd46c1ed2 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 10 Dec 2013 22:16:41 -0700 Subject: Issue #18864: Add a setter for ModuleSpec.has_location. --- Lib/importlib/_bootstrap.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/importlib/_bootstrap.py') diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 6b8f979b8b..baa6c162c6 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -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.""" -- cgit v1.2.1