[wingide-users] __repr__, print self and debug probe

Luc Bourhis luc_j_bourhis at mac.com
Tue Sep 14 03:58:08 MDT 2010


Hi all,

I have a class featuring a method __repr__ and a method like

def show_scatterers(self):
  # print some attributes of the class
  return self

The purpose of the return statement is to allow chaining of such operations: xs.show_summary().show_scatterers()

The problem happens when I execute xs.show_scatterers() in the debug probe: not only the printing internal to that method occurs but Wing does also display the representation of that object xs because the former call return the latter object.

Is there a trick I am missing that would prevent Wing from displaying repr(xs) here? I tried Preferences > Debugger > Data filters to no avail...

Luc Bourhis
Computer Scientist
Chemical Crystallography Laboratory
University of Durham, UK



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3681 bytes
Desc: not available
Url : /pipermail/wingide-users/attachments/20100914/2204ddea/smime.bin


More information about the wingide-users mailing list