Commit Graph

31066 Commits

Author SHA1 Message Date
Tim Peters 10c7e86454 deque_traverse(): If the deque had one block, and its rightindex was
BLOCKLEN-1, this assert-failed in a debug build, or went wild with a
NULL pointer in a release build.  Reported on c.l.py by Stefan Behnel.
2004-10-01 02:01:04 +00:00
Tim Peters d6e0032768 Typos in new comments. 2004-10-01 01:35:54 +00:00
Tim Peters d8768d3294 Document some reverse-engineered invariants and pragmatic hints. 2004-10-01 01:32:53 +00:00
Greg Ward e644a1b921 Get references working (except for references to "Extending optparse",
which isn't being converted from reST yet).
2004-10-01 01:16:39 +00:00
Tim Peters 6f85356ff7 Definition consistency. 2004-10-01 01:04:50 +00:00
Tim Peters 1065f750cb Trimmed trailing whitespace. 2004-10-01 01:03:29 +00:00
Raymond Hettinger 7b46f6b2a5 Add tests for syntax errors. 2004-09-30 22:29:03 +00:00
Edward Loper 0fe00aafc3 Added 2 notes about the complexities of testing SyntaxErrors. 2004-09-30 17:18:18 +00:00
Raymond Hettinger 49c522be80 Expand scope to include general mapping protocol tests.
Many of these tests are redundant, but this will ensure
that the mapping protocols all stay in sync.
Also, added a test for dictionary subclasses.
2004-09-30 15:07:29 +00:00
Walter Dörwald 59b23e8b80 Add missing test_dict.py from patch #736962. 2004-09-30 13:46:00 +00:00
Raymond Hettinger 5ea7e31076 Improve test coverage. 2004-09-30 07:47:20 +00:00
Raymond Hettinger f751fa6195 SF bug #1035279: hex() and oct() documentation is incorrect
* Updated docs to reflected signed return values.
* Fixed a doubled word typo.
2004-09-30 00:59:08 +00:00
Raymond Hettinger fec0c466ad Improve error message for augmented assignments to genexps or listcomps.
Rather than introduce new logic, took the approach of making the message
itself more general.
2004-09-29 23:54:08 +00:00
Raymond Hettinger 8ffc1410e2 Fix two erroneous error messages. 2004-09-29 21:47:10 +00:00
Nicholas Bastin 975e725fc7 Fix typo in PyDict_Items doc 2004-09-29 21:39:26 +00:00
Raymond Hettinger ff5dc0ee77 Improve test coverage. 2004-09-29 11:40:50 +00:00
Raymond Hettinger bcab2b25f9 Improve test coverage. 2004-09-29 08:03:17 +00:00
Skip Montanaro 5497feefac minor doc tweaks for writexml 2004-09-28 18:40:42 +00:00
Skip Montanaro 67db9a5b72 typo 2004-09-28 18:30:03 +00:00
Raymond Hettinger 06cc973d06 Replaced a test with an assertion.
(Suggested by Michael Hudson.)
2004-09-28 17:22:12 +00:00
Tim Peters 01ba799244 A number of list examples used 66.6, but I doubt there's any box on which
repr(66.6) == "66.6", so doubt that the claimed output has ever been seen.
Changed it to 66.25 everywhere, and manually verified that the new claimed
output is correct.
2004-09-28 16:12:50 +00:00
Edward Loper 7d88a58e85 Reverted the addition of a NORMALIZE_NUMBERS option, per Tim Peter's
request.  Tim says that "correct 'fuzzy' comparison of floats cannot
be automated."  (The motivation behind adding the new option
was verifying interactive examples in Python's latex documentation;
several such examples use numbers that don't print consistently on
different platforms.)
2004-09-28 05:50:57 +00:00
Raymond Hettinger 4cda01e260 * Increase test coverage.
* Have groupby() be careful about decreffing structure members.
2004-09-28 04:45:28 +00:00
Edward Loper aec3c9b54f Added a new NORMALIZE_NUMBERS option, which causes number literals in
the expected output to match corresponding number literals in the
actual output if their values are equal (to ten digits of precision).
2004-09-28 04:29:57 +00:00
Brett Cannon bfef869510 Add note about inclusion of DarwinPorts directories in setup.py on darwin. 2004-09-28 04:08:11 +00:00
Brett Cannon 35b93d9720 Add the directories where DarwinPorts installs library and include files to
the proper path directories for compiling extension modules.
2004-09-28 03:49:52 +00:00
Edward Loper 1793dd31de Fixed minor typo in interactive example (extra '.'s in '...' prompts) 2004-09-28 03:12:01 +00:00
Edward Loper dcdb4b4d78 Fixed minor typo in interactive example (extra blank line) 2004-09-28 03:08:57 +00:00
Raymond Hettinger 78a5271d3e SF bug #1033038: Misleading error message in random.choice
Added a clarifying line to the docs.
2004-09-28 03:04:23 +00:00
Edward Loper ad512265a5 Fixed minor typo in interactive example 2004-09-28 02:56:45 +00:00
Edward Loper 3077b02ff4 Fixed minor typo in interactive example (backslash shouldn't be doubled) 2004-09-28 02:54:54 +00:00
Edward Loper a7f62814cf Updated interactive examples in the "Examples" session to reflect the
fact that compiler.ast.Function now takes a "decorators" argument.
2004-09-28 02:53:50 +00:00
Raymond Hettinger 87de0ca741 Silence a compiler warning by supplying the correct argument type to
the htons() function.
2004-09-28 02:19:40 +00:00
Raymond Hettinger 6429a4727e Use Py_CLEAR(). Add unrelated test. 2004-09-28 01:51:35 +00:00
Greg Ward b6f7fb7327 Major overhaul to reflect Optik 1.5. Section references currently broken. 2004-09-28 01:30:23 +00:00
Raymond Hettinger 855d9a985b Plug a leak and beef-up test coverage. 2004-09-28 00:03:54 +00:00
Raymond Hettinger 630e5355b5 Rename test for comparision errors. 2004-09-27 23:11:35 +00:00
Raymond Hettinger 63251781d1 Beef-up tests for greater coverage and refcount checking. 2004-09-27 22:48:40 +00:00
Armin Rigo b6aa856f25 Patch #1009075, bug #952953: allow execve with empty 2nd argument 2004-09-27 19:54:33 +00:00
Armin Rigo 9f90439817 Patch #1011240: SystemError generated by struct.pack('P', 'foo'). 2004-09-27 19:27:51 +00:00
Armin Rigo b562bc672b Trivial bug fix: deque == [] is not a good way to check if a deque is empty. 2004-09-27 17:49:00 +00:00
Raymond Hettinger ffdb8bb99c Use floor division operator. 2004-09-27 15:29:05 +00:00
Raymond Hettinger 4837a223ee Use floor division operator. 2004-09-27 14:23:40 +00:00
Edward Loper a4c6a8522c - Added a "parser" option to testfile() and DocFileTest(). 2004-09-27 04:08:20 +00:00
Edward Loper 498a1868e7 - Added a "parser" option to testfile() and DocFileTest(). 2004-09-27 03:42:58 +00:00
Edward Loper 456ff91664 - Fixed typo in multi-line exception example
- Fixed indentation for a verbatim block
2004-09-27 03:30:44 +00:00
Tim Peters 36ee8ce373 Give a saner example for script_from_examples(); also mention an intended
but not entirely obvious use case.
2004-09-26 21:51:25 +00:00
Tim Peters 9463d8761b Made most module references "clickable". 2004-09-26 21:05:03 +00:00
Tim Peters 0041121c25 Docs for run_docstring_examples(). 2004-09-26 20:45:04 +00:00
Raymond Hettinger aa241e0149 Checkin Tim's fix to an error discussed on python-dev.
Also, add a testcase.

Formerly, the list_extend() code used several local variables to remember
its state across iterations.  Since an iteration could call arbitrary
Python code, it was possible for the list state to be changed.  The new
code uses dynamic structure references instead of C locals.  So, they
are always up-to-date.

After list_resize() is called, its size has been updated but the new
cells are filled with NULLs.  These needed to be filled before arbitrary
iteration code was called; otherwise, that code could attempt to modify
a list that was in a semi-invalid state.  The solution was to change
the ob->size field back to a value reflecting the actual number of valid
cells.
2004-09-26 19:24:20 +00:00