__doc__ in interactive mode

Alex Martelli aleax at aleax.it
Wed Jan 16 06:37:09 EST 2002


"rihad" <rihad at mail.ru> wrote in message
news:48ma4u0a7ioqb5cbvqua456a6frgs448ql at 4ax.com...
    ...
> How come? Doesn't print use repr() (same as ``) for its output?

No, print uses str() instead.  str() is intended to give a human
readable string representation, while repr() is intended to give
a detailed, information-richer-even-if-less-readable one.


Alex






More information about the Python-list mailing list