Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a

staticmethod.
This commit is contained in:
Brett Cannon 2014-05-09 12:28:22 -04:00
parent a237a98753
commit 6eaac13c92
4 changed files with 17 additions and 2 deletions

View file

@ -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'