[Python-checkins] cpython: A better repr() for FileFinder

antoine.pitrou python-checkins at python.org
Sat Jun 23 02:17:58 CEST 2012


http://hg.python.org/cpython/rev/df856963fc6c
changeset:   77600:df856963fc6c
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Jun 23 02:12:56 2012 +0200
summary:
  A better repr() for FileFinder

files:
  Lib/importlib/_bootstrap.py |     2 +
  Python/importlib.h          |  2162 +++++++++++-----------
  2 files changed, 1090 insertions(+), 1074 deletions(-)


diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -1169,6 +1169,8 @@
 
         return path_hook_for_FileFinder
 
+    def __repr__(self):
+        return "FileFinder(%r)" % (self.path,)
 
 
 # Import itself ###############################################################
diff --git a/Python/importlib.h b/Python/importlib.h
--- a/Python/importlib.h
+++ b/Python/importlib.h
[stripped]

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list