From: Brett Cannon Date: Tue, 3 Feb 2009 05:08:22 +0000 (+0000) Subject: Backport importlib to at least Python 2.5 by getting rid of use of str.format. X-Git-Tag: v2.7a1~2131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1797b7dbbcc6d9db1ad51ca7e771f5a7e37299f5;p=python Backport importlib to at least Python 2.5 by getting rid of use of str.format. --- diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index 89398deda0..65f0a83fe5 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -12,7 +12,7 @@ def _resolve_name(name, package, level): raise ValueError("__package__ not set to a string") base = package.rsplit('.', level)[0] if name: - return "{0}.{1}".format(base, name) + return "%s.%s" % (base, name) else: return base