mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Backport importlib to at least Python 2.5 by getting rid of use of str.format.
This commit is contained in:
parent
9db495b506
commit
1797b7dbbc
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue