By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 2,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

class print?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.