[Python-checkins] r61709 - python/trunk/Doc/library/functions.rst python/trunk/Doc/library/future_builtins.rst python/trunk/Doc/library/python.rst

Georg Brandl g.brandl at gmx.net
Mon Mar 24 10:47:51 CET 2008


Sorry, but I don't see an ambiguity here. "Like str() does" means "like the
builtin, not overridden str() does". Of course, "converted to strings using
str()" would be wrong.

Georg

Jim Jewett schrieb:
> What is the precise specification of the builtin "print" function.
> Does it call "str", or does it just behave as if the builtin str had
> been called?
> 
> In 2.5, the print statement ignores any overrides of the str builtin,
> but I'm not sure whether a _function_ should -- and I do think it
> should be specified.
> 
> -jJ
> 
> On 3/21/08, georg.brandl <python-checkins at python.org> wrote:
>>  New Revision: 61709
> 
> ==============================================================================
> 
>>  +++ python/trunk/Doc/library/functions.rst      Fri Mar 21 20:37:57 2008
>>  @@ -817,6 +817,33 @@
> 
> ...
>>  +.. function:: print([object, ...][, sep=' '][, end='\n'][, file=sys.stdout])
> ...
> 
>>  +   All non-keyword arguments are converted to strings like :func:`str` does


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-checkins mailing list