[Python-checkins] r69257 - python/trunk/Lib/importlib/__init__.py

brett.cannon python-checkins at python.org
Tue Feb 3 06:08:22 CET 2009


Author: brett.cannon
Date: Tue Feb  3 06:08:22 2009
New Revision: 69257

Log:
Backport importlib to at least Python 2.5 by getting rid of use of str.format.

Modified:
   python/trunk/Lib/importlib/__init__.py

Modified: python/trunk/Lib/importlib/__init__.py
==============================================================================
--- python/trunk/Lib/importlib/__init__.py	(original)
+++ python/trunk/Lib/importlib/__init__.py	Tue Feb  3 06:08:22 2009
@@ -12,7 +12,7 @@
         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
 


More information about the Python-checkins mailing list