give field id in __repr__ tls-sprint
authorsylvain.thenault@logilab.fr
Thu, 12 Mar 2009 20:44:58 +0100
branchtls-sprint
changeset 1108 1e5ed5f57f2f
parent 1107 961a478593a5
child 1109 9e472941abd4
give field id in __repr__
web/formfields.py
--- a/web/formfields.py	Thu Mar 12 20:07:20 2009 +0100
+++ b/web/formfields.py	Thu Mar 12 20:44:58 2009 +0100
@@ -45,11 +45,11 @@
         # global fields ordering in forms
         self.creation_rank = Field.creation_rank
         Field.creation_rank += 1
-
+    
     def __unicode__(self):
-        return u'<%s name=%r label=%r id=%r initial=%r>' % (
+        return u'<%s name=%r label=%r id=%r initial=%r @%x>' % (
             self.__class__.__name__, self.name, self.label,
-            self.id, self.initial)
+            self.id, self.initial, id(self))
 
     def __repr__(self):
         return self.__unicode__().encode('utf-8')