Michael Foord
345b2fe21e
Better exception messages for unittest assert methods.
...
- unittest.assertNotEqual() now uses the inequality operator (!=) instead
of the equality operator.
- Default assertTrue and assertFalse messages are now useful.
- TestCase has a longMessage attribute. This defaults to False, but if set to True
useful error messages are shown in addition to explicit messages passed to assert methods.
Issue #5663
2009-04-02 03:20:38 +00:00
Andrew M. Kuchling
e9d35ef230
Typo fix
2009-04-02 00:02:14 +00:00
Georg Brandl
88ed8f2c50
#4572 : add SEEK_* values as constants in io.py.
2009-04-01 21:00:55 +00:00
Raymond Hettinger
fff2f4bb03
Add link to an alternative generator with a long-period.
2009-04-01 20:50:58 +00:00
Jesse Noller
b12e79da1b
Issue 3270: document Listener address restrictions on windows
2009-04-01 16:42:19 +00:00
Jesse Noller
02cb0eb231
Fix multiprocessing.event to match the new threading.Event API
2009-04-01 03:45:50 +00:00
Josiah Carlson
bb94d43dcd
Fix for failing asyncore tests.
2009-04-01 01:28:11 +00:00
Raymond Hettinger
6bc94cbbc8
Improve examples for collections.deque()
2009-03-31 22:43:03 +00:00
Georg Brandl
b7715865e7
#3427 : document correct return type for urlopen().info().
2009-03-31 22:18:19 +00:00
Georg Brandl
a08e8dedc2
#5598 : document DocFileSuite *args argument.
2009-03-31 21:15:33 +00:00
Georg Brandl
ef660e8e50
#1674032 : return value of flag from Event.wait(). OKed by Guido.
2009-03-31 20:41:08 +00:00
Gregory P. Smith
65ff00559a
Issue an actual PendingDeprecationWarning for the TestCase.fail* methods.
...
Document the deprecation.
2009-03-31 19:59:14 +00:00
Georg Brandl
956ed9782a
#4411 : document mro() and __mro__. (I hope I got it right.)
2009-03-31 19:26:24 +00:00
Georg Brandl
b48adecbd6
#1096310 : document usage of sys.__std*__ a bit better.
2009-03-31 19:10:35 +00:00
Georg Brandl
5206086e0d
#4882 : document named group behavior a bit better.
2009-03-31 19:06:57 +00:00
Georg Brandl
22717dffba
#837577 : note cryptic return value of spawn*e on invalid env dicts.
2009-03-31 18:26:55 +00:00
Gregory P. Smith
2839985c7e
The unittest.TestCase.assertEqual() now displays the differences in lists,
...
tuples, dicts and sets on failure.
Many new handy type and comparison specific assert* methods have been added
that fail with error messages actually useful for debugging. Contributed in
by Google and completed with help from mfoord and GvR at PyCon 2009 sprints.
Discussion lives in http://bugs.python.org/issue2578 .
2009-03-31 16:54:10 +00:00
Georg Brandl
b945bbf33e
#1386675 : specify WindowsError as the exception, because it has a winerror attribute that EnvironmentError doesnt have.
2009-03-31 16:31:11 +00:00
Georg Brandl
624f3372e2
#5529 : backport new docs of import semantics written by Brett to 2.x.
2009-03-31 16:11:45 +00:00
Georg Brandl
21b60afd4c
#5581 : fget argument of abstractproperty is optional as well.
2009-03-31 15:50:16 +00:00
Georg Brandl
382edff289
#5519 : remove reference to Kodos, which seems dead.
2009-03-31 15:43:20 +00:00
Andrew M. Kuchling
efa97718e6
typo fix
2009-03-30 23:08:24 +00:00
Barry Warsaw
dbf95a3643
A fix for issue 1974, inspired by the patch from Andi Albrecht (aalbrecht),
...
though with some changes by me. This patch should not be back ported or
forward ported. It's a bit too risky for 2.6 and 3.x does things fairly
differently.
2009-03-30 22:42:17 +00:00
Andrew M. Kuchling
55acfc6c87
Many edits
2009-03-30 22:31:11 +00:00
Andrew M. Kuchling
19672006a7
Typo fixes
2009-03-30 22:29:15 +00:00
Georg Brandl
d59efbccf1
#5199 : make warning about vars() assignment more visible.
2009-03-30 22:09:34 +00:00
Ronald Oussoren
008af85dc0
Fix for issue 13095
2009-03-30 20:02:08 +00:00
Ronald Oussoren
8ba6f3baf6
Fix for issue 896199 (some Carbon modules aren't present in the documentation)
2009-03-30 16:01:51 +00:00
Benjamin Peterson
ac0580edc2
there's actually three methods here #5600
2009-03-30 02:49:32 +00:00
Mark Dickinson
2e648ecc7d
Issue #532631 : Replace confusing fabs(x)/1e25 >= 1e25 test
...
with fabs(x) >= 1e50, and fix documentation.
2009-03-29 14:37:51 +00:00
Benjamin Peterson
097aafdde6
fix consistency
2009-03-29 03:39:58 +00:00
Benjamin Peterson
7233acc5c5
stop the versionchanged directive from hiding the docs
2009-03-29 03:31:40 +00:00
Benjamin Peterson
be76d4caed
a more realistic example
2009-03-29 03:16:57 +00:00
Georg Brandl
a0eea590c7
Add section numbering to some of the larger subdocuments.
2009-03-28 19:57:36 +00:00
Benjamin Peterson
0e9285845e
give os.symlink and os.link() better parameter names #5564
2009-03-28 19:16:10 +00:00
Georg Brandl
a31aa45fbf
#5324 : document __subclasses__().
2009-03-28 19:10:37 +00:00
Benjamin Peterson
47d9738b0f
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
2009-03-26 20:05:50 +00:00
Skip Montanaro
9a1337b95e
clarify the type of data returned
2009-03-25 00:52:11 +00:00
Raymond Hettinger
21b617bd98
Add links to related resources.
2009-03-24 00:17:11 +00:00
Benjamin Peterson
31b7806ee8
forgot to document that setUp can be skipped (silly me...)
2009-03-23 23:13:36 +00:00
Benjamin Peterson
99721e0c44
refactor unittest docs
2009-03-23 23:10:14 +00:00
Benjamin Peterson
cb2b0e45d4
comply with the evilJavaNamingScheme for attribute names
...
It seems my love of PEP 8 overrode the need for consistentcy
2009-03-23 22:29:45 +00:00
Benjamin Peterson
692428e77f
implement test skipping and expected failures
...
patch by myself #1034053
2009-03-23 21:50:21 +00:00
Antoine Pitrou
f8387af262
Issue #4688 : Add a heuristic so that tuples and dicts containing only
...
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
on long-running programs, depending on their particular use of datatypes.
(trivia: this makes the "binary_trees" benchmark from the Computer Language
Shootout 40% faster)
2009-03-23 18:41:45 +00:00
Raymond Hettinger
2cef1a5409
Add MutableSet example.
2009-03-20 18:25:49 +00:00
Mark Dickinson
efc82f7e8e
Issue #4258 : Use 30-bit digits for Python longs, on 64-bit platforms.
...
Backport of r70459.
2009-03-20 15:51:55 +00:00
Raymond Hettinger
2412299be9
* Add clearer comment to initialization code.
...
* Add optional argument to popitem() -- modeled
after Anthon van der Neut's C version.
* Fix method markup in docs.
2009-03-19 19:59:58 +00:00
Raymond Hettinger
91852ca673
Issue 5381: Add object_pairs_hook to the json module.
2009-03-19 19:19:03 +00:00
Benjamin Peterson
06919a177d
a much better example
2009-03-18 20:58:09 +00:00
Benjamin Peterson
ed3558b334
I thought this was begging for an example
2009-03-17 20:29:51 +00:00
Georg Brandl
8cbe9556cf
Add token markup.
2009-03-16 19:42:03 +00:00
Georg Brandl
545a134916
Fix markup in re docs and give a mail address in regex howto, so that
...
the recommendation to send suggestions to the author can be followed.
2009-03-15 21:59:37 +00:00
Georg Brandl
09827eb55e
#5276 : document IDLESTARTUP and .Idle.py.
2009-03-15 21:51:48 +00:00
Georg Brandl
8db96b5969
#5478 : fix copy-paste oversight in function signature.
2009-03-15 21:47:42 +00:00
Georg Brandl
5a95b21fee
#5491 : clarify nested() semantics.
2009-03-15 21:44:43 +00:00
Georg Brandl
e83a4adba7
#5486 : typos.
2009-03-13 19:03:58 +00:00
Raymond Hettinger
efa7c138b6
Issue 5477: Fix buglet in the itertools documentation.
2009-03-12 00:31:58 +00:00
Brett Cannon
6c4cff0f32
Require implementations for warnings.showwarning() support the 'line' argument.
...
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652 .
2009-03-11 04:51:06 +00:00
Raymond Hettinger
8f19598f78
Fix typo.
2009-03-10 13:04:30 +00:00
Raymond Hettinger
56411aac79
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
2009-03-10 12:50:59 +00:00
Raymond Hettinger
ced6b1da83
Update the decimal FAQ for the from_float() classmethod and improve the recipe for remove_exponent() to make it cut and pasteable.
2009-03-10 08:16:05 +00:00
Raymond Hettinger
eecd1dc6e0
Clarify the meaning of normal and subnormal.
2009-03-10 04:40:24 +00:00
Raymond Hettinger
f345a21d8e
Update url for the spec.
2009-03-10 01:07:30 +00:00
Raymond Hettinger
f4ea929044
Fix markup.
2009-03-10 00:06:05 +00:00
Benjamin Peterson
6d83429a1d
gzip and bz2 are context managers
2009-03-09 20:38:56 +00:00
Georg Brandl
38f1bf6745
Add missing space.
2009-03-09 16:35:48 +00:00
Georg Brandl
2cd82a8383
#5458 : add a note when we started to raise RuntimeErrors.
2009-03-09 14:25:07 +00:00
Raymond Hettinger
9324ed8982
Add cross-reference to the collections docs.
2009-03-09 12:56:23 +00:00
Raymond Hettinger
3496a89f27
Add consume() recipe to itertools docs.
2009-03-09 11:57:29 +00:00
Raymond Hettinger
fed84c765d
Issue 5443: Fix typo.
2009-03-09 11:31:39 +00:00
Jesus Cea
ce15a65ca7
Minor bsddb documentation glitch
2009-03-05 19:37:37 +00:00
Benjamin Peterson
c51ec0a9e3
add example
2009-03-05 00:17:57 +00:00
Facundo Batista
eeafb96b08
Fixed a typo.
2009-03-04 21:18:17 +00:00
Georg Brandl
d5ad6da03b
Remove obsolete stuff from string module docs.
2009-03-04 18:24:41 +00:00
Benjamin Peterson
288618e1a7
making the writing more formal
2009-03-03 22:51:57 +00:00
Raymond Hettinger
a07038d614
Fix markup.
2009-03-03 05:11:56 +00:00
Raymond Hettinger
e89b8e9832
Backport 70111: Let configparser use ordered dicts by default.
2009-03-03 05:00:37 +00:00
Raymond Hettinger
88a9164cdb
Backport 70106: Add OrderedDict support to collections.namedtuple().
2009-03-03 04:51:24 +00:00
Raymond Hettinger
bc512d3abd
Backport PEP 372: OrderedDict()
2009-03-03 04:45:34 +00:00
Gregory P. Smith
ae91d0907d
Adds an optional flags argument to re.split, re.sub and re.subn to be
...
consistent with the other re module functions.
2009-03-02 05:13:57 +00:00
Gregory P. Smith
0261e5d0b6
The note about caching of regular expression objects was incorrect ReST and
...
thus invisible in the compiled documentation. Fixed. Also I cleaned up the
wording.
2009-03-02 04:53:24 +00:00
Raymond Hettinger
3bac8b20b5
Fix docs for ConfigParser.
2009-03-01 02:04:32 +00:00
Jeffrey Yasskin
68d6852006
Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
...
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
2009-02-28 19:03:21 +00:00
Hirokazu Yamamoto
02172ddbee
Binary flag is needed on windows.
2009-02-28 15:24:00 +00:00
Georg Brandl
5c189b16a8
#5365 : add quick look conversion table for different time representations.
2009-02-27 16:59:03 +00:00
Georg Brandl
ee6361f7d8
#5363 : fix cmpfiles() docs. Another instance where a prose description is twice as long as the code.
2009-02-27 16:39:26 +00:00
Georg Brandl
da2790c47d
#5361 : fix typo.
2009-02-27 16:23:18 +00:00
Georg Brandl
13813f7092
Document that setting sys.py3kwarning wont do anything.
2009-02-26 17:36:26 +00:00
Benjamin Peterson
a168698ab3
fix str.format()'s first arg #5371
2009-02-26 00:30:11 +00:00
Raymond Hettinger
ed955f108f
Fix typo.
2009-02-26 00:05:24 +00:00
Raymond Hettinger
a665853bab
Clarify Counter() docs.
2009-02-25 22:48:24 +00:00
Raymond Hettinger
afe496dc46
Remove reference to zero argument form of super() in 2.x docs.
2009-02-25 01:06:52 +00:00
Raymond Hettinger
b762d58544
More markup and spelling fixes.
2009-02-25 00:52:37 +00:00
Raymond Hettinger
eb7cbb94c5
Restore Py2.x version of sample call to super().
2009-02-25 00:39:47 +00:00
Raymond Hettinger
9766033b7c
Sync-up py3.1 doc updates for super().
2009-02-25 00:37:57 +00:00
Raymond Hettinger
d47442e3cb
Update itertools recipes to use next().
2009-02-23 19:32:55 +00:00
Georg Brandl
52bc7b85fd
Fix grammar.
2009-02-23 18:33:48 +00:00
Georg Brandl
de196911f1
#5352 : str.count() counts non-overlapping instances.
2009-02-23 15:51:27 +00:00
Georg Brandl
89d4f0d7c5
#5349 : C++ pure virtuals can also have an implementation.
2009-02-23 11:24:46 +00:00
Georg Brandl
528f8810aa
#5348 : format() converts all kinds of values.
2009-02-23 10:24:23 +00:00
Mark Dickinson
3e4caeb3bf
Issue #5341 : Fix a variety of spelling errors.
2009-02-21 20:27:01 +00:00
Georg Brandl
8b8c2df9b1
Fix punctuation.
2009-02-20 08:45:47 +00:00
Georg Brandl
6b5dbaa6c9
At least separate imports from other statements.
2009-02-20 08:22:21 +00:00
Benjamin Peterson
a7b55a33f8
revert r69777 since all the experts agree that extra import lines distract from the code
2009-02-20 03:31:23 +00:00
Jeroen Ruigrok van der Werven
5149742e8b
Since we recommend one module per import line, reflect this also in the
...
documentation.
2009-02-19 18:52:21 +00:00
Raymond Hettinger
749e6d0a01
Add links to helpful external resources.
2009-02-19 06:55:03 +00:00
Raymond Hettinger
7d854955e1
Add an example for math.fsum() and elaborate on the accurary note.
2009-02-19 05:51:41 +00:00
Raymond Hettinger
f9bce83e71
Add some cross-references to the docs. Simplify the python code equivalent for izip(). Supply an optional argument for the nth() recipe.
2009-02-19 05:34:35 +00:00
Raymond Hettinger
c8223b09b0
Generalize the itertools.tee() recipe.
2009-02-18 20:54:53 +00:00
Gregory P. Smith
8367becc02
Clarify socket timeout behavior vs system network stack behavior on connect
...
for issue5293.
2009-02-18 05:46:11 +00:00
Georg Brandl
580d7c1f57
#5268 : mention VMSError.
2009-02-18 00:31:36 +00:00
Georg Brandl
52f6b6d500
#5297 : fix example.
2009-02-18 00:22:55 +00:00
Marc-André Lemburg
1d0b5cc6dc
Clarify the deprecation of platform.dist().
...
Add versionadded tags.
2009-02-17 12:48:19 +00:00
Raymond Hettinger
0aee942a08
Fixup intro paragraphs for the itertools docs. Add some tables for quick reference.
2009-02-17 11:00:27 +00:00
Raymond Hettinger
f746a1f1e4
Fix-up intro paragraph for collections docs.
2009-02-17 08:33:01 +00:00
Raymond Hettinger
7c98a6d4dc
Add explanation for super(type1, type2).
2009-02-16 23:00:25 +00:00
Raymond Hettinger
fd04870a3d
Issue 5229: Documentation for super() neglects to say what super() actually does
2009-02-16 22:42:54 +00:00
Hirokazu Yamamoto
5b8c701eef
Fixed typo.
2009-02-15 09:19:48 +00:00
Raymond Hettinger
a4038038c6
Add keyword argument support to itertools.count().
2009-02-14 00:25:51 +00:00
Georg Brandl
5ccf2ae21c
#1661108 : note that urlsafe encoded string can contain "=".
2009-02-13 10:56:50 +00:00
Georg Brandl
8fba5b337c
#4894 : document "newurl" parameter to redirect_request().
2009-02-13 10:40:14 +00:00
Raymond Hettinger
31c769ca89
Issue 5032: added a step argument to itertools.count() and allowed non-integer arguments.
2009-02-12 05:39:46 +00:00
Benjamin Peterson
1312b4bcfd
os.fsync() should be used to ensure that data is written to disk
2009-02-12 03:50:00 +00:00
Raymond Hettinger
e4ae63c402
Clean-up named tuple docs.
2009-02-11 00:06:17 +00:00
Raymond Hettinger
322daea7c3
Issue 1818: collections.namedtuple() to support automatic renaming of invalid fieldnames.
2009-02-10 01:24:05 +00:00
Benjamin Peterson
b8e17f7370
a few edits and typos
2009-02-08 15:14:57 +00:00
Benjamin Peterson
c5e68b1898
document numliterals fixer
2009-02-08 14:38:13 +00:00
Nick Coghlan
0194f5bc98
Issue #4512 closeout: Make ZipImport.get_filename() a public method
2009-02-08 03:17:00 +00:00
Nick Coghlan
d39600e69f
Issue 4195: Restore the ability to execute packages with the -m switch (but this time in a way that leaves the import machinery in a valid state). (Original patch by Andi Vajda)
2009-02-08 01:26:34 +00:00
Benjamin Peterson
e0820e2ea7
document individual 2to3 fixers
2009-02-07 23:01:19 +00:00
Georg Brandl
95f8ef2825
make "super only for new-style classes" a note.
2009-02-07 18:49:54 +00:00
Georg Brandl
34feea3205
#5174 : fix wrong file closing in example.
2009-02-07 12:21:17 +00:00
Eric Smith
81fe09344c
Implement issue #4285 , convert sys.version_info to a named
...
tuple. Patch by Ross Light.
2009-02-06 00:48:26 +00:00
Georg Brandl
ecd2afa452
#5031 : fix Thread.daemon property docs.
2009-02-05 11:40:35 +00:00
Georg Brandl
2b0dd8e199
#4820 : use correct module for ctypes.util.
2009-02-05 11:35:28 +00:00
Georg Brandl
253a29fa4d
#4827 : fix callback example.
2009-02-05 11:33:21 +00:00
Georg Brandl
b21c75beab
#5059 : fix example.
2009-02-05 10:59:28 +00:00
Georg Brandl
174fbe7742
#5153 : fix typo in example.
2009-02-05 10:30:57 +00:00
Raymond Hettinger
939a3cc5a2
Tweak the docs for Counter() objects.
2009-02-04 11:31:30 +00:00
Raymond Hettinger
8184f5a46c
Doc fixes. Remove overbroad, redundant warnings. Fixup example code.
2009-02-04 11:14:18 +00:00
Raymond Hettinger
d507afdc81
Minor doc fixups.
2009-02-04 10:52:32 +00:00
Raymond Hettinger
4a1b62a555
Record operator deprecations in docs.
2009-02-03 03:18:14 +00:00
Gregory P. Smith
86cc5029dc
wording for for issue4903.
2009-02-01 00:24:21 +00:00
Gregory P. Smith
5501d65590
Update doc wording as suggested in issue4903.
2009-02-01 00:16:01 +00:00
Benjamin Peterson
4829136965
fix indentation
2009-01-31 20:01:48 +00:00
Andrew M. Kuchling
8c2f85c43e
Text edits and markup fixes
2009-01-31 03:26:02 +00:00
Brett Cannon
8aa2c6ce8e
Minor spelling mistake in datetime docs.
2009-01-29 00:54:32 +00:00
Raymond Hettinger
1712baa852
Correct docs for ABCs (MutableSequence was missing __setiem). Simplify the table by taking out inherited requirements for abstract methods.
2009-01-28 23:58:16 +00:00
Guilherme Polo
cda93aafde
Added the ttk module. See issue #2983 : Ttk support for Tkinter.
2009-01-28 13:09:03 +00:00
Raymond Hettinger
d081abc8be
Promote combinations_with_replacement() from a recipe to a regular itertool.
2009-01-27 02:58:49 +00:00