diff options
author | Georg Brandl <georg@python.org> | 2007-09-04 07:15:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-04 07:15:32 (GMT) |
commit | 6911e3ce3f72af759908b869b73391ea00d328e2 (patch) | |
tree | 5d4ff6070cb3f0f46f0a31ee4805b41053a06b48 /Doc/tutorial/interpreter.rst | |
parent | c9879246a2dd33a217960496fdf4606cb117c6a6 (diff) | |
download | cpython-6911e3ce3f72af759908b869b73391ea00d328e2.zip cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.gz cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.bz2 |
Convert all print statements in the docs.
Diffstat (limited to 'Doc/tutorial/interpreter.rst')
-rw-r--r-- | Doc/tutorial/interpreter.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst index 8b42090..ce78399 100644 --- a/Doc/tutorial/interpreter.rst +++ b/Doc/tutorial/interpreter.rst @@ -111,7 +111,7 @@ example, take a look at this :keyword:`if` statement:: >>> the_world_is_flat = 1 >>> if the_world_is_flat: - ... print "Be careful not to fall off!" + ... print("Be careful not to fall off!") ... Be careful not to fall off! @@ -170,6 +170,8 @@ The script can be given an executable mode, or permission, using the Source Code Encoding -------------------- +.. XXX out of date! + It is possible to use encodings different than ASCII in Python source files. The best way to do it is to put one more special comment line right after the ``#!`` line to define the source file encoding:: @@ -191,7 +193,7 @@ to the Euro symbol) and then exit:: # -*- coding: iso-8859-15 -*- currency = u"€" - print ord(currency) + print(ord(currency)) If your editor supports saving files as ``UTF-8`` with a UTF-8 *byte order mark* (aka BOM), you can use that instead of an encoding declaration. IDLE supports |