Give PTEntry a helpful __repr__ method.
authorEvan Broder <broder@mit.edu>
Tue, 17 Mar 2009 23:17:53 +0000 (19:17 -0400)
committerEvan Broder <broder@mit.edu>
Tue, 17 Mar 2009 23:18:01 +0000 (19:18 -0400)
Signed-off-by: Evan Broder <broder@mit.edu>

afs/_pts.pyx

index ba3da9f..b7424de 100644 (file)
@@ -76,6 +76,9 @@ cdef class PTEntry:
     cdef public afs_int32 nusers
     cdef public afs_int32 count
 
+    def __repr__(self):
+        return '<PTEntry: %s>' % self.id
+
 cdef int _ptentry_from_checkentry(PTEntry p_entry, prcheckentry c_entry) except -1:
     if p_entry is None:
         raise TypeError