[Python-Dev] Round Bug in Python 1.6?
Greg Ward
gward at mems-exchange.org
Fri Apr 7 09:15:46 EDT 2000
On 07 April 2000, Mikael Olofsson said:
>
> On 07-Apr-00 Greg Ward wrote:
> > Oh, joy! oh happiness! someday soon, I may be able to type
> > "blah.__doc__" at the interactive prompt and get a readable result!
>
> Just i case... I hope you haven't missed "print blah.__doc__".
Yeah, I know: my usual mode of operation is this:
>>> blah.__doc__
...repr of docstring...
...sound of me cursing...
>>> print blah.__doc__
The real reason for using str() at the interactive prompt is not to save
me keystrokes, but because it just seems like the sensible thing to do.
People who understand the str/repr difference, and really want the repr
version, can slap backquotes around whatever they're printing.
Greg
More information about the Python-list
mailing list