Raymond Hettinger
a665853bab
Clarify Counter() docs.
2009-02-25 22:48:24 +00:00
Raymond Hettinger
eb7cbb94c5
Restore Py2.x version of sample call to super().
2009-02-25 00:39:47 +00:00
Raymond Hettinger
f746a1f1e4
Fix-up intro paragraph for collections docs.
2009-02-17 08:33:01 +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
Raymond Hettinger
939a3cc5a2
Tweak the docs for Counter() objects.
2009-02-04 11:31:30 +00:00
Raymond Hettinger
d507afdc81
Minor doc fixups.
2009-02-04 10:52: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
Raymond Hettinger
d081abc8be
Promote combinations_with_replacement() from a recipe to a regular itertool.
2009-01-27 02:58:49 +00:00
Raymond Hettinger
22bfa9e3e8
Tweak column alignment for collections docs.
2009-01-27 02:36:33 +00:00
Raymond Hettinger
2bcb8e9b0d
Promote compress() from a recipe to being a regular itertool.
2009-01-25 21:04:14 +00:00
Raymond Hettinger
7bdca05a3b
More doc tweaks.
2009-01-22 05:20:47 +00:00
Raymond Hettinger
0a1f7b8f72
Tighten-up the docs for Counter().
2009-01-21 23:12:51 +00:00
Raymond Hettinger
4571f347f9
Simplify explanation of multiset operations by removing restrictions on negative inputs.
2009-01-21 20:31:50 +00:00
Raymond Hettinger
acdc84abcf
Beautify and cleanup the references section.
2009-01-20 23:42:54 +00:00
Raymond Hettinger
196a0f7a8a
Fix typos.
2009-01-20 12:59:36 +00:00
Raymond Hettinger
230dd27628
Don't disrupt automatic url target name generation
...
with manually specified, conflicting names.
Before:
http://docs.python.org/dev/library/collections.html#id1
After:
http://docs.python.org/dev/library/collections.html#counter-objects
2009-01-20 07:11:47 +00:00
Raymond Hettinger
bad1eb2ff3
Build-outs for Counter() class:
...
* Constructor and update() support keyword args (like their dict counterparts).
* The 'del' statement no longer raises KeyError for missing values.
* Add multiset operations: __add__, __sub__, __and__, __or__.
2009-01-20 01:19:26 +00:00
Raymond Hettinger
2950bca89c
Fix-up indentation of sample code blocks for namedtuple mthod definitions.
2009-01-14 01:39:51 +00:00
Raymond Hettinger
59894127e4
Minor doc tweaks.
2009-01-14 00:15:21 +00:00
Raymond Hettinger
fbcf749479
Add table of idioms/patterns for using Counter objects.
...
Improve the appearance and flow of the References section -- it used
to have a box around it that wasn't distinct from the preceding code
boxes and it had a weird bolding pattern and hanging indents that
made the section disproportionately large.
2009-01-13 08:38:14 +00:00
Raymond Hettinger
8278385a05
Minor documentation tweaks and simpler update() example.
2009-01-13 03:49:43 +00:00
Raymond Hettinger
aaa6e630f8
Simplify Counter() API. Replace items keyword argument
...
with a mapping. Makes Counter() idempotent, makes update()
API the same as Counter.__init__(), makes a more readable
repr, makes the API more dict-like, and allows Steven
Bethard's update() example to work.
2009-01-13 01:05:03 +00:00
Raymond Hettinger
f94d7fa5fb
Issue 1696199: Add collections.Counter().
2009-01-12 22:58:41 +00:00
Georg Brandl
7044b11818
Remove tabs from the documentation.
2009-01-03 21:04:55 +00:00
Georg Brandl
c62ef8b4d9
Remove trailing whitespace.
2009-01-03 20:55:06 +00:00
Georg Brandl
df9bcf1196
Fix typo.
2008-11-24 16:16:07 +00:00
Georg Brandl
061d2e2ee9
#4392 : fix parameter name.
2008-11-23 19:17:25 +00:00
Benjamin Peterson
5c4e006367
document that deque indexing is O(n) #4123
2008-10-16 18:52:14 +00:00
Skip Montanaro
b40890db07
usage
2008-09-17 11:50:36 +00:00
Georg Brandl
dbc5987e2f
Add missing ABCs to list.
2008-07-08 07:05:23 +00:00
Raymond Hettinger
ee51cffc95
Fix whitespace in example code.
2008-06-27 21:34:24 +00:00
Raymond Hettinger
e98839a1f4
Issue3065: Fixed pickling of named tuples. Added tests.
2008-06-09 01:28:30 +00:00
Raymond Hettinger
96b424062b
Fix typo
2008-05-23 17:34:34 +00:00
Raymond Hettinger
5a9fed75bd
Fix-up the enumerate type example and move it to the end.
2008-05-08 07:23:30 +00:00
Benjamin Peterson
c7b05920d6
reformat some documentation of classes so methods and attributes are under the class directive
2008-04-25 01:29:10 +00:00
Georg Brandl
d289ea6df9
#2502 : add example how to do enum types with named tuples.
2008-03-28 12:58:26 +00:00
Georg Brandl
4c8bbe69e5
Make collections' doctests executable.
...
(The <BLANKLINE>s will be stripped from presentation output.)
2008-03-22 21:06:20 +00:00
Georg Brandl
907a720f89
A lot more typo fixes by Ori Avtalion.
2008-02-22 12:31:45 +00:00
Raymond Hettinger
bc4ffc17df
Backport ABC docs
2008-02-11 23:38:00 +00:00
Raymond Hettinger
9bba7b7085
Removed an unnecessary and confusing paragraph from the namedtuple docs.
2008-01-27 10:47:55 +00:00
Raymond Hettinger
0fe6ca4673
Better variable name in an example.
2008-01-18 21:14:58 +00:00
Raymond Hettinger
171f3916c5
Minor wordsmithing.
2008-01-16 23:38:16 +00:00
Raymond Hettinger
e805782b53
Fix-up half-written paragraph in the docs
2008-01-15 21:22:47 +00:00
Raymond Hettinger
f59e962b49
Refactor if/elif chain for clarity and speed. Remove dependency on subclasses having to implement _empty and _full.
2008-01-15 20:52:42 +00:00
Raymond Hettinger
d1ef85420f
Run doctests on the collections module
2008-01-11 00:23:13 +00:00
Raymond Hettinger
15b5e55b48
Neaten-up the named tuple docs
2008-01-10 23:00:01 +00:00
Raymond Hettinger
e850c466c7
Clarify how to add a field to a named tuple.
2008-01-10 20:37:12 +00:00
Raymond Hettinger
e1655088ca
Examples for named tuple subclassing should include __slots__
2008-01-10 19:15:10 +00:00
Raymond Hettinger
dc1854dec4
Fix typo
2008-01-09 03:13:20 +00:00