Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62423cb

Browse files
committed
#7500: add "Python 3 review needed" comments and fix a few obvious errors.
1 parent 9e4ff75 commit 62423cb

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

Doc/faq/extending.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Extending/Embedding FAQ
77
.. highlight:: c
88

99

10+
.. XXX need review for Python 3.
11+
12+
1013
Can I create my own functions in C?
1114
-----------------------------------
1215

@@ -51,8 +54,7 @@ with a tool such as `SWIG <http://www.swig.org>`_. `SIP
5154
<http://www.riverbankcomputing.co.uk/software/sip/>`__, `CXX
5255
<http://cxx.sourceforge.net/>`_ `Boost
5356
<http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
54-
<http://www.scipy.org/site_content/weave>`_ are also alternatives for wrapping
55-
C++ libraries.
57+
<http://www.scipy.org/Weave>`_ are also alternatives for wrapping C++ libraries.
5658

5759

5860
How can I execute arbitrary Python statements from C?
@@ -159,8 +161,8 @@ Sample code and use for catching stdout:
159161
...
160162
>>> import sys
161163
>>> sys.stdout = StdoutCatcher()
162-
>>> print 'foo'
163-
>>> print 'hello world!'
164+
>>> print('foo')
165+
>>> print('hello world!')
164166
>>> sys.stderr.write(sys.stdout.data)
165167
foo
166168
hello world!
@@ -201,7 +203,7 @@ For C++ libraries, you can look at `SIP
201203
<http://www.riverbankcomputing.co.uk/sip/>`_, `CXX
202204
<http://cxx.sourceforge.net/>`_, `Boost
203205
<http://www.boost.org/libs/python/doc/index.html>`_, `Weave
204-
<http://www.scipy.org/site_content/weave>`_ or `SWIG <http://www.swig.org>`_
206+
<http://www.scipy.org/Weave>`_ or `SWIG <http://www.swig.org>`_
205207

206208

207209
I added a module using the Setup file and the make fails; why?
@@ -470,12 +472,9 @@ checking the value of sys.maxunicode:
470472

471473
>>> import sys
472474
>>> if sys.maxunicode > 65535:
473-
... print 'UCS4 build'
475+
... print('UCS4 build')
474476
... else:
475-
... print 'UCS2 build'
477+
... print('UCS2 build')
476478

477479
The only way to solve this problem is to use extension modules compiled with a
478480
Python binary built using the same size for Unicode characters.
479-
480-
481-

Doc/faq/gui.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Graphic User Interface FAQ
66

77
.. contents::
88

9+
.. XXX need review for Python 3.
10+
11+
912
General GUI Questions
1013
=====================
1114

@@ -159,6 +162,3 @@ The most common cause is that the widget to which the binding applies doesn't
159162
have "keyboard focus". Check out the Tk documentation for the focus command.
160163
Usually a widget is given the keyboard focus by clicking in it (but not for
161164
labels; see the takefocus option).
162-
163-
164-

Doc/faq/windows.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Python on Windows FAQ
88

99
.. contents::
1010

11+
.. XXX need review for Python 3.
12+
XXX need review for Windows Vista/Seven?
13+
14+
1115
How do I run a Python program under Windows?
1216
--------------------------------------------
1317

@@ -67,7 +71,7 @@ Python statements or expressions interactively and have them executed or
6771
evaluated while you wait. This is one of Python's strongest features. Check it
6872
by entering a few expressions of your choice and seeing the results::
6973

70-
>>> print "Hello"
74+
>>> print("Hello")
7175
Hello
7276
>>> "Hello" * 3
7377
HelloHelloHello
@@ -507,7 +511,7 @@ Example::
507511

508512
import win32pipe
509513
f = win32pipe.popen('dir /c c:\\')
510-
print f.readlines()
514+
print(f.readlines())
511515
f.close()
512516

513517

0 commit comments

Comments
 (0)