R
Ross Williamson
Hi All
Is there anyway in a class to overload the print function?
Gives:
<__main__.foo_class instance at ....>
Can I do something like:
Gives:
hello
I'm looking at finding nice way to print variables in a class just by
asking to print it
Cheers
Ross
--
Ross Williamson
University of Chicago
Department of Astronomy & Astrophysics
773-834-9785 (office)
312-504-3051 (Cell)
Is there anyway in a class to overload the print function?
Gives:
<__main__.foo_class instance at ....>
Can I do something like:
Gives:
hello
I'm looking at finding nice way to print variables in a class just by
asking to print it
Cheers
Ross
--
Ross Williamson
University of Chicago
Department of Astronomy & Astrophysics
773-834-9785 (office)
312-504-3051 (Cell)