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/reference/expressions.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/reference/expressions.rst')
-rw-r--r-- | Doc/reference/expressions.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 6f7e13f..0994ea8 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -376,7 +376,7 @@ Here is a simple example that demonstrates the behavior of generators and generator functions:: >>> def echo(value=None): - ... print "Execution starts when 'next()' is called for the first time." + ... print("Execution starts when 'next()' is called for the first time.") ... try: ... while True: ... try: @@ -387,15 +387,15 @@ generator functions:: ... except Exception, e: ... value = e ... finally: - ... print "Don't forget to clean up when 'close()' is called." + ... print("Don't forget to clean up when 'close()' is called.") ... >>> generator = echo(1) - >>> print generator.next() + >>> print(generator.next()) Execution starts when 'next()' is called for the first time. 1 - >>> print generator.next() + >>> print(generator.next()) None - >>> print generator.send(2) + >>> print(generator.send(2)) 2 >>> generator.throw(TypeError, "spam") TypeError('spam',) @@ -640,7 +640,7 @@ A consequence of this is that although the ``*expression`` syntax appears (and the ``**expression`` argument, if any -- see below). So:: >>> def f(a, b): - ... print a, b + ... print(a, b) ... >>> f(b=1, *(2,)) 2 1 |