ソースを参照

Use new class name in __repr__ for child classes.

Jelmer Vernooij 16 年 前
コミット
5a3eec8ea4
1 ファイル変更1 行追加1 行削除
  1. 1 1
      dulwich/pack.py

+ 1 - 1
dulwich/pack.py

@@ -927,7 +927,7 @@ class Pack(object):
         return len(self.idx)
 
     def __repr__(self):
-        return "Pack(%r)" % self._basename
+        return "%s(%r)" % (self.__class__.__name__, self._basename)
 
     def __iter__(self):
         """Iterate over all the sha1s of the objects in this pack."""