[Tutor] Alter print action for objects

Shrutarshi Basu technorapture at gmail.com
Wed Jul 23 12:04:58 CEST 2008

I'm working on a graph class to become more familiar with graphs in
general. I'd like to be able to do something like 'print gr'  and get
something intelligible like a list of vertices. But using print on a
Graph class instance simply returns <Graph instance at some_hex_addr>
Is there someway I can change what print prints?

The ByteBaker :

More information about the Tutor mailing list