]> granicus.if.org Git - python/log
python
17 years agoHandle the repeat keyword argument for itertools.product().
Raymond Hettinger [Fri, 29 Feb 2008 02:21:48 +0000 (02:21 +0000)]
Handle the repeat keyword argument for itertools.product().

17 years agoAdd __format__ method to Decimal, to support PEP 3101
Mark Dickinson [Fri, 29 Feb 2008 02:16:37 +0000 (02:16 +0000)]
Add __format__ method to Decimal, to support PEP 3101

17 years agoAdd alternate constructor for itertools.chain().
Raymond Hettinger [Thu, 28 Feb 2008 22:46:41 +0000 (22:46 +0000)]
Add alternate constructor for itertools.chain().

17 years agoHave itertools.chain() consume its inputs lazily instead of building a tuple of itera...
Raymond Hettinger [Thu, 28 Feb 2008 22:30:42 +0000 (22:30 +0000)]
Have itertools.chain() consume its inputs lazily instead of building a tuple of iterators at the outset.

17 years agoLocate VS installation dir from environment, so that it works with the express edition.
Martin v. Löwis [Thu, 28 Feb 2008 22:20:50 +0000 (22:20 +0000)]
Locate VS installation dir from environment, so that it works with the express edition.

17 years agoWindows fix for signal test - skip it earlier
Christian Heimes [Thu, 28 Feb 2008 21:00:45 +0000 (21:00 +0000)]
Windows fix for signal test - skip it earlier

17 years agoBundle msvcr90.dll as a "private assembly".
Martin v. Löwis [Thu, 28 Feb 2008 19:57:34 +0000 (19:57 +0000)]
Bundle msvcr90.dll as a "private assembly".

17 years agoAdd 2.6aN uuids.
Martin v. Löwis [Thu, 28 Feb 2008 19:44:22 +0000 (19:44 +0000)]
Add 2.6aN uuids.

17 years agoDocument impending updates to itertools.
Raymond Hettinger [Thu, 28 Feb 2008 19:41:24 +0000 (19:41 +0000)]
Document impending updates to itertools.

17 years agoPrevent SocketServer.ForkingMixIn from waiting on child processes that it
Jeffrey Yasskin [Thu, 28 Feb 2008 18:03:15 +0000 (18:03 +0000)]
Prevent SocketServer.ForkingMixIn from waiting on child processes that it
didn't create, in most cases. When there are max_children handlers running, it
will still wait for any child process, not just handler processes.

17 years ago#2169: make generated HTML more valid
Andrew M. Kuchling [Thu, 28 Feb 2008 14:03:03 +0000 (14:03 +0000)]
#2169: make generated HTML more valid

17 years agoThe empty tuple is usually a singleton with a much higher refcnt than 1
Christian Heimes [Thu, 28 Feb 2008 11:18:49 +0000 (11:18 +0000)]
The empty tuple is usually a singleton with a much higher refcnt than 1

17 years agoAdd repeat keyword argument to itertools.product().
Raymond Hettinger [Thu, 28 Feb 2008 09:23:48 +0000 (09:23 +0000)]
Add repeat keyword argument to itertools.product().

17 years agoThread.start() used sleep(0.000001) to make sure it didn't return before the
Jeffrey Yasskin [Thu, 28 Feb 2008 06:09:19 +0000 (06:09 +0000)]
Thread.start() used sleep(0.000001) to make sure it didn't return before the
new thread had started. At least on my MacBook Pro, that wound up sleeping for
a full 10ms (probably 1 jiffy). By using an Event instead, we can be absolutely
certain that the thread has started, and return more quickly (217us).

Before:
$  ./python.exe -m timeit -s 'from threading import Thread'  't = Thread(); t.start(); t.join()'
100 loops, best of 3: 10.3 msec per loop
$  ./python.exe -m timeit -s 'from threading import Thread; t = Thread()'  't.isAlive()'
1000000 loops, best of 3: 0.47 usec per loop

After:
$  ./python.exe -m timeit -s 'from threading import Thread'  't = Thread(); t.start(); t.join()'
1000 loops, best of 3: 217 usec per loop
$  ./python.exe -m timeit -s 'from threading import Thread; t = Thread()'  't.isAlive()'
1000000 loops, best of 3: 0.86 usec per loop

To be fair, the 10ms isn't CPU time, and other threads including the spawned
one get to run during it. There are also some slightly more complicated ways to
get back the .4us in isAlive() if we want.

17 years agoSpeed test_socketserver up from 28.739s to 0.226s, simplify the logic, and make
Jeffrey Yasskin [Thu, 28 Feb 2008 05:53:18 +0000 (05:53 +0000)]
Speed test_socketserver up from 28.739s to 0.226s, simplify the logic, and make
sure all tests run even if some fail.

17 years agoMove abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,
Jeffrey Yasskin [Thu, 28 Feb 2008 04:45:36 +0000 (04:45 +0000)]
Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,
which forbids constructing types that have it set. The effect is to speed

  ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()'

up from 2.5us to 0.201us. This fixes issue 1762.

17 years agoSimply the sample code for combinations().
Raymond Hettinger [Wed, 27 Feb 2008 01:44:34 +0000 (01:44 +0000)]
Simply the sample code for combinations().

17 years agoLarger test range
Raymond Hettinger [Wed, 27 Feb 2008 01:08:30 +0000 (01:08 +0000)]
Larger test range

17 years agoOne too many decrefs.
Raymond Hettinger [Wed, 27 Feb 2008 01:08:04 +0000 (01:08 +0000)]
One too many decrefs.

17 years agoAdd itertools.combinations().
Raymond Hettinger [Tue, 26 Feb 2008 23:40:50 +0000 (23:40 +0000)]
Add itertools.combinations().

17 years ago#2194: fix some typos.
Georg Brandl [Tue, 26 Feb 2008 19:13:45 +0000 (19:13 +0000)]
#2194: fix some typos.

17 years agoPatch #1691070 from Roger Upole: Speed up PyArg_ParseTupleAndKeywords() and improve...
Christian Heimes [Tue, 26 Feb 2008 17:23:51 +0000 (17:23 +0000)]
Patch #1691070 from Roger Upole: Speed up PyArg_ParseTupleAndKeywords() and improve error msg
My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too.

17 years agoAdd a timing flag to Trace so you can see where slowness occurs
Neal Norwitz [Tue, 26 Feb 2008 08:21:28 +0000 (08:21 +0000)]
Add a timing flag to Trace so you can see where slowness occurs
like waiting for socket timeouts in test_smtplib :-).

17 years agoThe contains function raised a gcc warning. The new code is copied straight from...
Christian Heimes [Tue, 26 Feb 2008 08:18:11 +0000 (08:18 +0000)]
The contains function raised a gcc warning. The new code is copied straight from py3k.

17 years agoSpeed up this test by about 99%. Remove sleeps and replace with events.
Neal Norwitz [Tue, 26 Feb 2008 08:04:59 +0000 (08:04 +0000)]
Speed up this test by about 99%.  Remove sleeps and replace with events.
(This may fail on some slow platforms, but we can fix those cases which
should be relatively isolated and easier to find now.)
Move two test cases that didn't require a server to be started
to a separate TestCase.  These tests were taking 3 seconds which
is what the timeout was set to.

17 years agoBanish tab.
Georg Brandl [Tue, 26 Feb 2008 06:40:10 +0000 (06:40 +0000)]
Banish tab.

17 years agoWhitespace normalization
Neal Norwitz [Tue, 26 Feb 2008 05:23:51 +0000 (05:23 +0000)]
Whitespace normalization

17 years agoWhitespace normalization
Neal Norwitz [Tue, 26 Feb 2008 05:12:50 +0000 (05:12 +0000)]
Whitespace normalization

17 years agoDon't use a hard coded port. This test could hang/fail if the port is in use.
Neal Norwitz [Tue, 26 Feb 2008 04:50:37 +0000 (04:50 +0000)]
Don't use a hard coded port.  This test could hang/fail if the port is in use.
Speed this test up by avoiding a sleep and using the event.

17 years agoDocs for itertools.combinations(). Implementation in forthcoming checkin.
Raymond Hettinger [Tue, 26 Feb 2008 02:46:54 +0000 (02:46 +0000)]
Docs for itertools.combinations().  Implementation in forthcoming checkin.

17 years agoCoerced PyBool_Type to be able to compare it.
Facundo Batista [Mon, 25 Feb 2008 23:46:02 +0000 (23:46 +0000)]
Coerced PyBool_Type to be able to compare it.

17 years agoRevert part of r60927 which made invalid assumptions about the API offered by db...
Raymond Hettinger [Mon, 25 Feb 2008 23:17:41 +0000 (23:17 +0000)]
Revert part of r60927 which made invalid assumptions about the API offered by db modules.

17 years agoMake sure the itertools filter functions give the same performance for func=bool...
Raymond Hettinger [Mon, 25 Feb 2008 22:42:32 +0000 (22:42 +0000)]
Make sure the itertools filter functions give the same performance for func=bool as func=None.

17 years agoIssue 2168. gdbm and dbm needs to be iterable; this fixes a
Facundo Batista [Mon, 25 Feb 2008 22:33:55 +0000 (22:33 +0000)]
Issue 2168. gdbm and dbm needs to be iterable; this fixes a
failure in the shelve module.  Thanks Thomas Herve.

17 years agoRevert r61029.
Georg Brandl [Mon, 25 Feb 2008 20:20:45 +0000 (20:20 +0000)]
Revert r61029.

17 years agoRename sphinx.addons to sphinx.ext.
Georg Brandl [Mon, 25 Feb 2008 20:17:56 +0000 (20:17 +0000)]
Rename sphinx.addons to sphinx.ext.

17 years agoIssue 2117. Update compiler module to handle class decorators.
Facundo Batista [Mon, 25 Feb 2008 18:06:00 +0000 (18:06 +0000)]
Issue 2117.  Update compiler module to handle class decorators.
Thanks Thomas Herve

17 years agoThomas Herve explained to me that PyCrypto depends on the constants. I'm adding the...
Christian Heimes [Mon, 25 Feb 2008 17:32:07 +0000 (17:32 +0000)]
Thomas Herve explained to me that PyCrypto depends on the constants. I'm adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though.

17 years agoUse file descriptor for real stdout
Andrew M. Kuchling [Mon, 25 Feb 2008 16:29:58 +0000 (16:29 +0000)]
Use file descriptor for real stdout

17 years agoMove .setupterm() output so that we don't try to call endwin() if it fails
Andrew M. Kuchling [Mon, 25 Feb 2008 16:29:19 +0000 (16:29 +0000)]
Move .setupterm() output so that we don't try to call endwin() if it fails

17 years agoFix a minor typo in a docstring.
Brett Cannon [Mon, 25 Feb 2008 05:33:33 +0000 (05:33 +0000)]
Fix a minor typo in a docstring.

17 years agoAdd minor markup for a string.
Brett Cannon [Mon, 25 Feb 2008 05:33:07 +0000 (05:33 +0000)]
Add minor markup for a string.

17 years agoFix indentation
Neal Norwitz [Mon, 25 Feb 2008 01:45:37 +0000 (01:45 +0000)]
Fix indentation

17 years agoAdded dependency rules for Objects/stringlib/*.h
Christian Heimes [Sun, 24 Feb 2008 22:48:05 +0000 (22:48 +0000)]
Added dependency rules for Objects/stringlib/*.h
stringobject, unicodeobject and the two formatters are rebuild whenever a header files changes

17 years agoCorrected assert to check for correct type in py3k.
Eric Smith [Sun, 24 Feb 2008 21:41:49 +0000 (21:41 +0000)]
Corrected assert to check for correct type in py3k.

17 years agoCreate a db_home directory with a unique name so multiple users can
Neal Norwitz [Sun, 24 Feb 2008 18:47:03 +0000 (18:47 +0000)]
Create a db_home directory with a unique name so multiple users can
run the test simultaneously.  The simplest thing I found that worked
on both Windows and Unix was to use the PID.  It's unique so should be
sufficient.  This should prevent many of the spurious failures of
the automated tests since they run as different users.

Also cleanup the directory consistenly in the tearDown methods.

It would be nice if someone ensured that the directories are always
created with a consistent name.

17 years agoRemove duplicate 'import re' in decimal.py
Mark Dickinson [Sun, 24 Feb 2008 18:12:36 +0000 (18:12 +0000)]
Remove duplicate 'import re' in decimal.py

17 years agoUse PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.
Christian Heimes [Sun, 24 Feb 2008 12:26:16 +0000 (12:26 +0000)]
Use PY_FORMAT_SIZE_T instead of z for string formatting. Thanks Neal.

17 years agoFix typo of hexidecimal
Neal Norwitz [Sun, 24 Feb 2008 08:27:49 +0000 (08:27 +0000)]
Fix typo of hexidecimal

17 years agoGet ctypes working on the Alpha (Tru64). The problem was that there
Neal Norwitz [Sun, 24 Feb 2008 07:21:56 +0000 (07:21 +0000)]
Get ctypes working on the Alpha (Tru64).  The problem was that there
were two module_methods and the one used depended on the order the
modules were loaded.  By making the test module_methods static,
it is not exported and the correct version is picked up.

17 years agoIssue 1742669. Now %d accepts very big float numbers.
Facundo Batista [Sun, 24 Feb 2008 03:17:21 +0000 (03:17 +0000)]
Issue 1742669. Now %d accepts very big float numbers.
Thanks Gabriel Genellina.

17 years agoAdd a little info to the 3k deprecation warnings about what to use instead.
Neal Norwitz [Sun, 24 Feb 2008 02:40:58 +0000 (02:40 +0000)]
Add a little info to the 3k deprecation warnings about what to use instead.
Suggested by Raymond Hettinger.

17 years agoRemove stray word
Andrew M. Kuchling [Sun, 24 Feb 2008 02:39:15 +0000 (02:39 +0000)]
Remove stray word

17 years agomap(None, ...) is not supported in 3.0.
Neal Norwitz [Sun, 24 Feb 2008 02:20:25 +0000 (02:20 +0000)]
map(None, ...) is not supported in 3.0.

17 years ago#1627: httplib now ignores negative Content-Length headers.
Georg Brandl [Sun, 24 Feb 2008 00:14:24 +0000 (00:14 +0000)]
#1627: httplib now ignores negative Content-Length headers.

17 years ago#900744: If an invalid chunked-encoding header is sent by a server,
Georg Brandl [Sun, 24 Feb 2008 00:03:22 +0000 (00:03 +0000)]
#900744: If an invalid chunked-encoding header is sent by a server,
httplib will now raise IncompleteRead and close the connection instead
of raising ValueError.

17 years agoMS Windows doesn't have mode_t but stat.st_mode is defined as unsigned short.
Christian Heimes [Sat, 23 Feb 2008 23:59:45 +0000 (23:59 +0000)]
MS Windows doesn't have mode_t but stat.st_mode is defined as unsigned short.

17 years agoSpecify what kind of warning -3 emits.
Georg Brandl [Sat, 23 Feb 2008 23:43:01 +0000 (23:43 +0000)]
Specify what kind of warning -3 emits.

17 years agoDocument import ./. threading issues. #1720705.
Georg Brandl [Sat, 23 Feb 2008 23:25:26 +0000 (23:25 +0000)]
Document import ./. threading issues. #1720705.

17 years ago#1506171: added operator.methodcaller().
Georg Brandl [Sat, 23 Feb 2008 23:04:35 +0000 (23:04 +0000)]
#1506171: added operator.methodcaller().

17 years ago#1826: allow dotted attribute paths in operator.attrgetter.
Georg Brandl [Sat, 23 Feb 2008 23:02:23 +0000 (23:02 +0000)]
#1826: allow dotted attribute paths in operator.attrgetter.

17 years ago#1825: correctly document msilib.add_data.
Georg Brandl [Sat, 23 Feb 2008 22:55:18 +0000 (22:55 +0000)]
#1825: correctly document msilib.add_data.

17 years agoAdded simple test case. Thanks Benjamin Peterson.
Facundo Batista [Sat, 23 Feb 2008 22:54:12 +0000 (22:54 +0000)]
Added simple test case. Thanks Benjamin Peterson.

17 years agoIn test_heapq and test_bisect, test both the Python and the C implementation.
Georg Brandl [Sat, 23 Feb 2008 22:35:33 +0000 (22:35 +0000)]
In test_heapq and test_bisect, test both the Python and the C implementation.
Originally written for GHOP by Josip Dzolonga, heavily patched by me.

17 years agoUse os.closerange().
Georg Brandl [Sat, 23 Feb 2008 22:14:02 +0000 (22:14 +0000)]
Use os.closerange().

17 years agoUse os.closerange() in popen2.
Georg Brandl [Sat, 23 Feb 2008 22:09:24 +0000 (22:09 +0000)]
Use os.closerange() in popen2.

17 years agoAdd examples to modulefinder docs. Written for GHOP by Josip Dzolonga.
Georg Brandl [Sat, 23 Feb 2008 22:05:38 +0000 (22:05 +0000)]
Add examples to modulefinder docs. Written for GHOP by Josip Dzolonga.

17 years ago#2101: fix removeAttribute docs.
Georg Brandl [Sat, 23 Feb 2008 21:59:11 +0000 (21:59 +0000)]
#2101: fix removeAttribute docs.

17 years agoFollowup to r61011: Also avoid the reference cycle when the Thread's target
Jeffrey Yasskin [Sat, 23 Feb 2008 20:40:35 +0000 (20:40 +0000)]
Followup to r61011: Also avoid the reference cycle when the Thread's target
raises an exception.

17 years agoPrevent classes like:
Jeffrey Yasskin [Sat, 23 Feb 2008 19:40:54 +0000 (19:40 +0000)]
Prevent classes like:
    class RunSelfFunction(object):
        def __init__(self):
            self.thread = threading.Thread(target=self._run)
            self.thread.start()
        def _run(self):
            pass
from creating a permanent cycle between the object and the thread by having the
Thread delete its references to the object when it completes.

As an example of the effect of this bug, paramiko.Transport inherits from
Thread to avoid it.

17 years ago#1389051, #1092502: fix excessively large allocations when using read() on a socket
Andrew M. Kuchling [Sat, 23 Feb 2008 19:28:58 +0000 (19:28 +0000)]
#1389051, #1092502: fix excessively large allocations when using read() on a socket

17 years ago#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik...
Andrew M. Kuchling [Sat, 23 Feb 2008 19:02:33 +0000 (19:02 +0000)]
#1389051: IMAP module tries to read entire message in one chunk.  Patch by Fredrik Lundh.

17 years agoDocumentation coverage builder, part 1.
Georg Brandl [Sat, 23 Feb 2008 18:47:04 +0000 (18:47 +0000)]
Documentation coverage builder, part 1.

17 years agoIssue #2051 and patch from Alexander Belopolsky:
Christian Heimes [Sat, 23 Feb 2008 17:52:07 +0000 (17:52 +0000)]
Issue #2051 and patch from Alexander Belopolsky:
Permission for pyc and pyo files are inherited from the py file.

17 years agoPatch #1957: syslogmodule: Release GIL when calling syslog(3)
Christian Heimes [Sat, 23 Feb 2008 17:42:31 +0000 (17:42 +0000)]
Patch #1957: syslogmodule: Release GIL when calling syslog(3)

17 years agoPatch #2167 from calvin: Remove unused imports
Christian Heimes [Sat, 23 Feb 2008 17:40:11 +0000 (17:40 +0000)]
Patch #2167 from calvin: Remove unused imports

17 years ago#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Andrew M. Kuchling [Sat, 23 Feb 2008 17:10:46 +0000 (17:10 +0000)]
#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Fix by Malte Helmert

17 years ago#835521: Add index entries for various pickle-protocol methods and attributes
Andrew M. Kuchling [Sat, 23 Feb 2008 16:39:43 +0000 (16:39 +0000)]
#835521: Add index entries for various pickle-protocol methods and attributes

17 years ago#1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Andrew M. Kuchling [Sat, 23 Feb 2008 16:23:05 +0000 (16:23 +0000)]
#1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Remove automatic handling of datetime.date and datetime.time.
This breaks backward compatibility, but python-dev discussion was strongly
against this automatic conversion; see the bug for a link.

17 years agoRemoved duplicate Py_CHARMASK define. It's already defined in Python.h.
Eric Smith [Sat, 23 Feb 2008 16:05:26 +0000 (16:05 +0000)]
Removed duplicate Py_CHARMASK define.  It's already defined in Python.h.

17 years ago#1119331: ncurses will just call exit() if the terminal name isn't found.
Andrew M. Kuchling [Sat, 23 Feb 2008 15:49:35 +0000 (15:49 +0000)]
#1119331: ncurses will just call exit() if the terminal name isn't found.
Call setupterm() first so that we get a Python exception instead of just existing.

17 years ago#2161: Fix opcode name.
Georg Brandl [Sat, 23 Feb 2008 15:43:48 +0000 (15:43 +0000)]
#2161: Fix opcode name.

17 years ago#2072: correct documentation for .rpc_paths
Andrew M. Kuchling [Sat, 23 Feb 2008 15:41:51 +0000 (15:41 +0000)]
#2072: correct documentation for .rpc_paths

17 years agoMore difflib examples. Written for GHOP by Josip Dzolonga.
Georg Brandl [Sat, 23 Feb 2008 15:19:54 +0000 (15:19 +0000)]
More difflib examples. Written for GHOP by Josip Dzolonga.

17 years ago#2067: file.__exit__() now calls subclasses' close() method.
Georg Brandl [Sat, 23 Feb 2008 15:11:18 +0000 (15:11 +0000)]
#2067: file.__exit__() now calls subclasses' close() method.

17 years agoIssue 1089358. Adds the siginterrupt() function, that is just a
Facundo Batista [Sat, 23 Feb 2008 15:07:35 +0000 (15:07 +0000)]
Issue 1089358.  Adds the siginterrupt() function, that is just a
wrapper around the system call with the same name.  Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.

17 years ago#2165: fix test_logging failure on some machines.
Georg Brandl [Sat, 23 Feb 2008 15:06:25 +0000 (15:06 +0000)]
#2165: fix test_logging failure on some machines.

17 years ago#1492: allow overriding BaseHTTPServer's content type for error messages.
Georg Brandl [Sat, 23 Feb 2008 15:02:28 +0000 (15:02 +0000)]
#1492: allow overriding BaseHTTPServer's content type for error messages.

17 years agoPatch #1759: Backport of PEP 3129 class decorators
Christian Heimes [Sat, 23 Feb 2008 15:01:05 +0000 (15:01 +0000)]
Patch #1759: Backport of PEP 3129 class decorators
with some help from Georg

17 years agoIssue 1781. Now ConfigParser.add_section does not let you add a
Facundo Batista [Sat, 23 Feb 2008 12:46:10 +0000 (12:46 +0000)]
Issue 1781. Now ConfigParser.add_section does not let you add a
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.

17 years agoIssue 1776581. Minor corrections to smtplib, and two small tests.
Facundo Batista [Sat, 23 Feb 2008 12:27:17 +0000 (12:27 +0000)]
Issue 1776581. Minor corrections to smtplib, and two small tests.
Thanks Alan McIntyre.

17 years agoIssue 1881. Increased the stack limit from 500 to 1500. Also added
Facundo Batista [Sat, 23 Feb 2008 12:01:13 +0000 (12:01 +0000)]
Issue 1881. Increased the stack limit from 500 to 1500. Also added
a test for this (and because of this test you'll see in stderr a
message that parser.c sends before raising MemoryError).
Thanks Ralf Schmitt.

17 years agoAdd recipe using itertools.product().
Raymond Hettinger [Sat, 23 Feb 2008 10:04:15 +0000 (10:04 +0000)]
Add recipe using itertools.product().

17 years agoAdd more comments
Raymond Hettinger [Sat, 23 Feb 2008 04:03:50 +0000 (04:03 +0000)]
Add more comments

17 years agoAdded future_builtins, which contains PEP 3127 compatible versions of hex() and oct().
Eric Smith [Sat, 23 Feb 2008 03:09:44 +0000 (03:09 +0000)]
Added future_builtins, which contains PEP 3127 compatible versions of hex() and oct().

17 years agoImprove the implementation of itertools.product()
Raymond Hettinger [Sat, 23 Feb 2008 02:20:41 +0000 (02:20 +0000)]
Improve the implementation of itertools.product()

* Fix-up issues pointed-out by Neal Norwitz.
* Add extensive comments.
* The lz->result variable is now a tuple instead of a list.
* Use fast macro getitem/setitem calls so most code is in-line.
* Re-use the result tuple if available (modify in-place instead of copy).

17 years agoDocument itertools.product().
Raymond Hettinger [Fri, 22 Feb 2008 19:50:06 +0000 (19:50 +0000)]
Document itertools.product().

17 years agoTests for bin() builtin. These need to get merged into py3k, which has no tests...
Eric Smith [Fri, 22 Feb 2008 17:43:17 +0000 (17:43 +0000)]
Tests for bin() builtin.  These need to get merged into py3k, which has no tests for bin.

17 years agoAdded bin() builtin. I'm going to check in the tests in a seperate checkin, because...
Eric Smith [Fri, 22 Feb 2008 16:30:22 +0000 (16:30 +0000)]
Added bin() builtin.  I'm going to check in the tests in a seperate checkin, because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.

17 years agoAnother fix.
Georg Brandl [Fri, 22 Feb 2008 12:57:05 +0000 (12:57 +0000)]
Another fix.