summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-05-09 16:28:22 (GMT)
committerBrett Cannon <brett@python.org>2014-05-09 16:28:22 (GMT)
commit6eaac13c92750afddebf22fc0a57e3f40e9d1a2f (patch)
treefb9563cccb0a04691fdbec1cc3dd5a41b1b311bb /Lib/importlib
parenta237a987539aed6ba28115c2e932b205c592be88 (diff)
downloadcpython-6eaac13c92750afddebf22fc0a57e3f40e9d1a2f.zip
cpython-6eaac13c92750afddebf22fc0a57e3f40e9d1a2f.tar.gz
cpython-6eaac13c92750afddebf22fc0a57e3f40e9d1a2f.tar.bz2
Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
staticmethod.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/abc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index 558abd3..7f6f235 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -217,7 +217,8 @@ class InspectLoader(Loader):
"""
raise ImportError
- def source_to_code(self, data, path='<string>'):
+ @staticmethod
+ def source_to_code(data, path='<string>'):
"""Compile 'data' into a code object.
The 'data' argument can be anything that compile() can handle. The'path'