Another unsolicited testimonial that countless users are oppressed by auto-repr (as opposed to auto-str) at the interpreter prompt. Just trying to keep a once-hot topic from going stone cold forever <wink>.
-----Original Message----- From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Ted Drain Sent: Wednesday, March 01, 2000 5:42 PM To: firstname.lastname@example.org Subject: String printing behavior?
Hi all, I've got a question about the string printing behavior. If I define a functions as:
... return "line1\nline2"
It seems to me that the default printing behavior for strings should match behavior of the print routine. I realize that some people may want to see embedded control codes, but I would advocate a seperate method for printing raw byte sequences.
We are using the python interactive prompt as a pseudo-matlab like user interface and the current printing behavior is very confusing to users. It also means that functions that return text (like help routines) must print the string rather than returning it. Returning the string is much more flexible because it allows the string to be captured easily and redirected.
-- Ted Drain Jet Propulsion Laboratory Ted.Drain@jpl.nasa.gov -- http://www.python.org/mailman/listinfo/python-list
"TP" == Tim Peters email@example.com writes:
TP> Another unsolicited testimonial that countless users are TP> oppressed by auto-repr (as opposed to auto-str) at the TP> interpreter prompt. Just trying to keep a once-hot topic from TP> going stone cold forever <wink>.
[Signature from the included message:]
-- Ted Drain Jet Propulsion Laboratory Ted.Drain@jpl.nasa.gov --
This guy is probably a rocket scientist. We want the language to be useful for everybody, not just rocket scientists. <wink>