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

Skip to content

Commit 1f01deb

Browse files
committed
Merged revisions 68162,68166,68171,68176,68195-68196,68210,68232 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 4472 is incompatible with Cygwin, this patch should fix that. ........ r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line document PyMemberDef ........ r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines #4811: fix markup glitches (mostly remains of the conversion), found by Gabriel Genellina. ........ r68176 | andrew.kuchling | 2009-01-02 22:00:35 +0100 (Fri, 02 Jan 2009) | 1 line Add various items ........ r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines Remove useless string literal. ........ r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines Fix indentation. ........ r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines Set eol-style correctly for mp_distributing.py. ........ r68232 | georg.brandl | 2009-01-03 22:52:16 +0100 (Sat, 03 Jan 2009) | 2 lines Grammar fix. ........
1 parent 814a2ca commit 1f01deb

23 files changed

Lines changed: 135 additions & 46 deletions

Doc/ACKS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ [email protected]), and we'll be glad to correct the problem.
6060
* Peter Funk
6161
* Lele Gaifax
6262
* Matthew Gallagher
63+
* Gabriel Genellina
6364
* Ben Gertzfield
6465
* Nadim Ghaznavi
6566
* Jonathan Giddy

Doc/c-api/arg.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ variable(s) whose address should be passed.
5353
string may contain embedded null bytes. Unicode objects pass back a pointer
5454
to the default encoded string version of the object if such a conversion is
5555
possible. All other read-buffer compatible objects pass back a reference to
56-
the raw internal data representation. Since this format doesn't allow writable buffer compatible objects like byte
57-
arrays, ``s*`` is to be preferred.
56+
the raw internal data representation. Since this format doesn't allow
57+
writable buffer compatible objects like byte arrays, ``s*`` is to be
58+
preferred.
5859

5960
The type of the length argument (int or :ctype:`Py_ssize_t`) is controlled by
6061
defining the macro :cmacro:`PY_SSIZE_T_CLEAN` before including

Doc/c-api/structures.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,64 @@ definition with the same method name.
198198
object and will co-exist with the slot. This is helpful because calls to
199199
PyCFunctions are optimized more than wrapper object calls.
200200

201+
202+
.. ctype:: PyMemberDef
203+
204+
Structure which describes an attribute of a type which corresponds to a C
205+
struct member. Its fields are:
206+
207+
+------------------+-------------+-------------------------------+
208+
| Field | C Type | Meaning |
209+
+==================+=============+===============================+
210+
| :attr:`name` | char \* | name of the member |
211+
+------------------+-------------+-------------------------------+
212+
| :attr:`type` | int | the type of the member in the |
213+
| | | C struct |
214+
+------------------+-------------+-------------------------------+
215+
| :attr:`offset` | Py_ssize_t | the offset in bytes that the |
216+
| | | member is located on the |
217+
| | | type's object struct |
218+
+------------------+-------------+-------------------------------+
219+
| :attr:`flags` | int | flag bits indicating if the |
220+
| | | field should be read-only or |
221+
| | | writable |
222+
+------------------+-------------+-------------------------------+
223+
| :attr:`doc` | char \* | points to the contents of the |
224+
| | | docstring |
225+
+------------------+-------------+-------------------------------+
226+
227+
:attr:`type` can be one of many ``T_`` macros corresponding to various C
228+
types. When the member is accessed in Python, it will be converted to the
229+
equivalent Python type.
230+
231+
=============== ==================
232+
Macro name C type
233+
=============== ==================
234+
T_SHORT short
235+
T_INT int
236+
T_LONG long
237+
T_FLOAT float
238+
T_DOUBLE double
239+
T_STRING char \*
240+
T_OBJECT PyObject \*
241+
T_OBJECT_EX PyObject \*
242+
T_CHAR char
243+
T_BYTE char
244+
T_UNBYTE unsigned char
245+
T_UINT unsigned int
246+
T_USHORT unsigned short
247+
T_ULONG unsigned long
248+
T_BOOL char
249+
T_LONGLONG long long
250+
T_ULONGLONG unsigned long long
251+
T_PYSSIZET Py_ssize_t
252+
=============== ==================
253+
254+
:cmacro:`T_OBJECT` and :cmacro:`T_OBJECT_EX` differ in that
255+
:cmacro:`T_OBJECT` returns ``None`` if the member is *NULL* and
256+
:cmacro:`T_OBJECT_EX` raises an :exc:`AttributeError`.
257+
258+
:attr:`flags` can be 0 for write and read access or :cmacro:`READONLY` for
259+
read-only access. Using :cmacro:`T_STRING` for :attr:`type` implies
260+
:cmacro:`READONLY`. Only :cmacro:`T_OBJECT` and :cmacro:`T_OBJECT_EX`
261+
members can be deleted. (They are set to *NULL*).

Doc/distutils/apiref.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ the full reference.
188188
| | for C/C++ header files (in | |
189189
| | Unix form for portability) | |
190190
+------------------------+--------------------------------+---------------------------+
191-
| *define_macros* | list of macros to define; each | (string,string) tuple or |
192-
| | macro is defined using a | (name,``None``) |
193-
| | 2-tuple, where 'value' is | |
191+
| *define_macros* | list of macros to define; each | (string, string) tuple or |
192+
| | macro is defined using a | (name, ``None``) |
193+
| | 2-tuple ``(name, value)``, | |
194+
| | where *value* is | |
194195
| | either the string to define it | |
195196
| | to or ``None`` to define it | |
196197
| | without a particular value | |

Doc/howto/functional.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ And here's an example of changing the counter:
586586
9
587587
>>> next(it)
588588
Traceback (most recent call last):
589-
File ``t.py'', line 15, in ?
589+
File "t.py", line 15, in ?
590590
it.next()
591591
StopIteration
592592

Doc/howto/urllib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ than the URL you pass to .add_password() will also match. ::
475475
password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
476476

477477
# Add the username and password.
478-
# If we knew the realm, we could use it instead of ``None``.
478+
# If we knew the realm, we could use it instead of None.
479479
top_level_url = "http://example.com/foo/"
480480
password_mgr.add_password(None, top_level_url, username, password)
481481

Doc/install/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ value of ``sys.path``. ::
584584
$ python
585585
Python 2.2 (#11, Oct 3 2002, 13:31:27)
586586
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-112)] on linux2
587-
Type ``help'', ``copyright'', ``credits'' or ``license'' for more information.
587+
Type "help", "copyright", "credits" or "license" for more information.
588588
>>> import sys
589589
>>> sys.path
590590
['', '/usr/local/lib/python2.3', '/usr/local/lib/python2.3/plat-linux2',

Doc/library/email.mime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ Here are the classes:
5555

5656
.. currentmodule:: email.mime.multipart
5757

58-
.. class:: MIMEMultipart([subtype[, boundary[, _subparts[, _params]]]])
58+
.. class:: MIMEMultipart([_subtype[, boundary[, _subparts[, _params]]]])
5959

6060
Module: :mod:`email.mime.multipart`
6161

6262
A subclass of :class:`MIMEBase`, this is an intermediate base class for MIME
6363
messages that are :mimetype:`multipart`. Optional *_subtype* defaults to
6464
:mimetype:`mixed`, but can be used to specify the subtype of the message. A
65-
:mailheader:`Content-Type` header of :mimetype:`multipart/`*_subtype* will be
65+
:mailheader:`Content-Type` header of :mimetype:`multipart/_subtype` will be
6666
added to the message object. A :mailheader:`MIME-Version` header will also be
6767
added.
6868

Doc/library/gzip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
This module provides a simple interface to compress and decompress files just
88
like the GNU programs :program:`gzip` and :program:`gunzip` would.
99

10-
The data compression is provided by the :mod:``zlib`` module.
10+
The data compression is provided by the :mod:`zlib` module.
1111

1212
The :mod:`gzip` module provides the :class:`GzipFile` class which is modeled
1313
after Python's File Object. The :class:`GzipFile` class reads and writes

Doc/library/http.cookiejar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ accessed using the following methods:
704704
The :class:`Cookie` class also defines the following method:
705705

706706

707-
.. method:: Cookie.is_expired([now=:const:`None`])
707+
.. method:: Cookie.is_expired([now=None])
708708

709709
True if cookie has passed the time at which the server requested it should
710710
expire. If *now* is given (in seconds since the epoch), return whether the

0 commit comments

Comments
 (0)