469,643 Members | 1,452 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

class print?

Hi... Many python object can be printed simpy by saying:
print obj
what method(s) need to be implemented in my own classes such that print
dumps the object?

Oct 7 '06 #1
1 1009
SpreadTooThin wrote:
Hi... Many python object can be printed simpy by saying:
print obj
what method(s) need to be implemented in my own classes such that print
dumps the object?
__str__

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Can I walk with you / 'Till the day that my heart stops beating
-- India Arie
Oct 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Fernando Rodriguez | last post: by
2 posts views Thread by Gabriel Genellina | last post: by
12 posts views Thread by Gaurav Veda | last post: by
15 posts views Thread by Tim Henderson | last post: by
8 posts views Thread by digitalorganics | last post: by
4 posts views Thread by Pupeno | last post: by
reply views Thread by emin.shopper | last post: by
37 posts views Thread by minkoo.seo | last post: by
21 posts views Thread by Mr.SpOOn | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.