Browse Source

Use new class name in __repr__ for child classes.

Jelmer Vernooij 16 năm trước cách đây
mục cha
commit
5a3eec8ea4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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."""