[Python-checkins] r57450 - sandbox/trunk/import_in_py/zipimport_/zipimport.py

brett.cannon python-checkins at python.org
Sat Aug 25 06:06:43 CEST 2007


Author: brett.cannon
Date: Sat Aug 25 06:06:43 2007
New Revision: 57450

Modified:
   sandbox/trunk/import_in_py/zipimport_/zipimport.py
Log:
Implement a simple repr.


Modified: sandbox/trunk/import_in_py/zipimport_/zipimport.py
==============================================================================
--- sandbox/trunk/import_in_py/zipimport_/zipimport.py	(original)
+++ sandbox/trunk/import_in_py/zipimport_/zipimport.py	Sat Aug 25 06:06:43 2007
@@ -36,10 +36,11 @@
         else:
             raise ZipImportError("the specified path must be a zip file")
         self._zip_path = path
+        self._path_entry = archivepath
         self._path_cache = {}
 
     def __repr__(self):
-        raise NotImplementedError
+        return '<zipimport.zipimporter instance for %r>' % self._path_entry
 
     def _check_paths(self, base_path):
         source_suffixes = importlib.suffix_list(imp.PY_SOURCE)


More information about the Python-checkins mailing list