[docs] A trivial 2.7 documentation bug

Georg Brandl georg at python.org
Sat Oct 23 19:18:17 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 20.10.2010 00:40, schrieb ben med:
>  Hello,
> 
> I noticed a smaal documentation bug in python 2.7 documentation at
> 
> 
>     7.1. Fancier Output Formatting¶
>     <http://docs.python.org/tutorial/inputoutput.html#fancier-output-formatting>
> 
> in the first example :
> 
>>>> # The repr() of a string adds string quotes and backslashes:
> ... hello = 'hello, world\n'
>>>> hellos = repr(hello)
>>>> print hellos
> 'hello, world\n'
> 
> So the last line I quoted here must be "'hello, world\\n'" as explained in the
> first line .
> 
> have a good day

Hi Mohamed,

did you actually try this example in the interpreter?  It is correct as written.

regards,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAkzDGNkACgkQN9GcIYhpnLCnzACfa68XGhIOlM9xaGRDQhk9WdfQ
DRUAoKcMlbX+ndrF246cuF7fe1ksyD0C
=Am7Y
-----END PGP SIGNATURE-----


More information about the docs mailing list