Merge heads

This commit is contained in:
Petri Lehtinen 2012-06-26 10:26:53 +03:00
commit 2391974110
11 changed files with 266 additions and 43 deletions

View file

@ -999,6 +999,9 @@ Instance methods:
# Convert from UTC to tz's local time.
return tz.fromutc(utc)
.. versionchanged:: 3.3
*tz* now can be omitted.
.. method:: datetime.utcoffset()

View file

@ -58,7 +58,7 @@ The available exception and functions in this module are:
exception if any error occurs.
.. function:: compressobj(level=-1, method=DEFLATED, wbits=15, memlevel=8, strategy=Z_DEFAULT_STRATEGY, [zdict])
.. function:: compressobj(level=-1, method=DEFLATED, wbits=15, memlevel=8, strategy=Z_DEFAULT_STRATEGY[, zdict])
Returns a compression object, to be used for compressing data streams that won't
fit into memory at once.
@ -86,6 +86,10 @@ The available exception and functions in this module are:
to occur frequently in the data that is to be compressed. Those subsequences
that are expected to be most common should come at the end of the dictionary.
.. versionchanged:: 3.3
Added the *method*, *wbits*, *memlevel*, *strategy* and *zdict*
parameters.
.. function:: crc32(data[, value])
@ -103,12 +107,13 @@ The available exception and functions in this module are:
Always returns an unsigned 32-bit integer.
.. note::
To generate the same numeric value across all Python versions and
platforms use crc32(data) & 0xffffffff. If you are only using
the checksum in packed binary format this is not necessary as the
return value is the correct 32bit binary representation
regardless of sign.
.. note::
To generate the same numeric value across all Python versions and
platforms, use ``crc32(data) & 0xffffffff``. If you are only using
the checksum in packed binary format this is not necessary as the
return value is the correct 32-bit binary representation
regardless of sign.
.. function:: decompress(data[, wbits[, bufsize]])
@ -135,7 +140,7 @@ The available exception and functions in this module are:
to :c:func:`malloc`. The default size is 16384.
.. function:: decompressobj([wbits[, zdict]])
.. function:: decompressobj(wbits=15[, zdict])
Returns a decompression object, to be used for decompressing data streams that
won't fit into memory at once.
@ -146,10 +151,14 @@ The available exception and functions in this module are:
provided, this must be the same dictionary as was used by the compressor that
produced the data that is to be decompressed.
.. note::
If *zdict* is a mutable object (such as a :class:`bytearray`), you must not
modify its contents between the call to :func:`decompressobj` and the first
call to the decompressor's ``decompress()`` method.
.. note::
If *zdict* is a mutable object (such as a :class:`bytearray`), you must not
modify its contents between the call to :func:`decompressobj` and the first
call to the decompressor's ``decompress()`` method.
.. versionchanged:: 3.3
Added the *zdict* parameter.
Compression objects support the following methods:

View file

@ -125,6 +125,32 @@ library/http.cookies,,`,!#$%&'*+-.^_`|~:
library/httplib,,:port,host:port
library/imaplib,,:MM,"""DD-Mmm-YYYY HH:MM:SS"
library/imaplib,,:SS,"""DD-Mmm-YYYY HH:MM:SS"
library/ipaddress,,:db8,>>> ipaddress.ip_address('2001:db8::')
library/ipaddress,,::,>>> ipaddress.ip_address('2001:db8::')
library/ipaddress,,:db8,IPv6Address('2001:db8::')
library/ipaddress,,::,IPv6Address('2001:db8::')
library/ipaddress,,:db8,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,::,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,:db8,IPv6Address('2001:db8::1000')
library/ipaddress,,::,IPv6Address('2001:db8::1000')
library/ipaddress,,:db8,>>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress,,::,>>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress,,:db8,IPv6Interface('2001:db8::1000/96')
library/ipaddress,,::,IPv6Interface('2001:db8::1000/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress,,::,>>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress,,:db8,IPv6Network('2001:db8::/96')
library/ipaddress,,::,IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress,,::,>>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,IPv6Network('2001:db8::/96')
library/ipaddress,,::,IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress,,::,>>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress,,:ffff,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress,,::,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress,,:db8,">>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)"
library/ipaddress,,::,">>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)"
library/itertools,,:step,elements from seq[start:stop:step]
library/itertools,,:stop,elements from seq[start:stop:step]
library/linecache,,:sys,"sys:x:3:3:sys:/dev:/bin/sh"

1 c-api/arg :ref PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
125 library/httplib :port host:port
126 library/imaplib :MM "DD-Mmm-YYYY HH:MM:SS
127 library/imaplib :SS "DD-Mmm-YYYY HH:MM:SS
128 library/ipaddress :db8 >>> ipaddress.ip_address('2001:db8::')
129 library/ipaddress :: >>> ipaddress.ip_address('2001:db8::')
130 library/ipaddress :db8 IPv6Address('2001:db8::')
131 library/ipaddress :: IPv6Address('2001:db8::')
132 library/ipaddress :db8 >>> ipaddress.IPv6Address('2001:db8::1000')
133 library/ipaddress :: >>> ipaddress.IPv6Address('2001:db8::1000')
134 library/ipaddress :db8 IPv6Address('2001:db8::1000')
135 library/ipaddress :: IPv6Address('2001:db8::1000')
136 library/ipaddress :db8 >>> ipaddress.IPv6Interface('2001:db8::1000/96')
137 library/ipaddress :: >>> ipaddress.IPv6Interface('2001:db8::1000/96')
138 library/ipaddress :db8 IPv6Interface('2001:db8::1000/96')
139 library/ipaddress :: IPv6Interface('2001:db8::1000/96')
140 library/ipaddress :db8 >>> ipaddress.IPv6Interface('2001:db8::1000/96').network
141 library/ipaddress :: >>> ipaddress.IPv6Interface('2001:db8::1000/96').network
142 library/ipaddress :db8 IPv6Network('2001:db8::/96')
143 library/ipaddress :: IPv6Network('2001:db8::/96')
144 library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::/96')
145 library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::/96')
146 library/ipaddress :db8 IPv6Network('2001:db8::/96')
147 library/ipaddress :: IPv6Network('2001:db8::/96')
148 library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::/96').netmask
149 library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::/96').netmask
150 library/ipaddress :ffff IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
151 library/ipaddress :: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
152 library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)
153 library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)
154 library/itertools :step elements from seq[start:stop:step]
155 library/itertools :stop elements from seq[start:stop:step]
156 library/linecache :sys sys:x:3:3:sys:/dev:/bin/sh