Benjamin Peterson
5c8da86f3a
convert usage of fail* to assert*
2009-06-30 22:57:08 +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
Antoine Pitrou
733dc74442
fill in actual issue number in tests
2009-01-01 15:38:03 +00:00
Antoine Pitrou
aa687902f2
Issue #3680 : Reference cycles created through a dict, set or deque iterator did not get collected.
2009-01-01 14:11:22 +00:00
Georg Brandl
1e13ea94a3
- Issue #3537 : Fix an assertion failure when an empty but presized dict
...
object was stored in the freelist.
2008-08-11 09:07:59 +00:00
Jeffrey Yasskin
ed414654c4
Speed up test_dict by about 10x by only checking selected dict literal sizes,
...
instead of every integer from 0 to 400. Exhaustive testing wastes time without
providing enough more assurance that the code is correct.
2008-03-18 05:12:41 +00:00
Christian Heimes
c5f05e45cf
Patch #2167 from calvin: Remove unused imports
2008-02-23 17:40:11 +00:00
Raymond Hettinger
3dbd4c536d
Changes 54857 and 54840 broke code and were reverted in Py2.5 just before
...
it was released, but that reversion never made it to the Py2.6 head.
2008-01-25 19:24:46 +00:00
Raymond Hettinger
3b63556d4a
Beef-up tests for dict literals
2007-12-19 00:21:06 +00:00
Guido van Rossum
64c06e327d
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
...
With some changes of my own thrown in (e.g. backport of r58107).
2007-11-22 00:55:51 +00:00
Raymond Hettinger
cdcf887999
Optimize dict.fromkeys() with dict inputs. Useful for resetting bag/muliset counts for example.
2007-11-07 02:26:17 +00:00
Tim Peters
ea5962f86e
Whitespace normalization.
2007-03-12 18:07:52 +00:00
Collin Winter
f567ca3e1a
Patch #1678088 : convert test_operations to use unittest, fold the result into test_dict.
2007-03-12 15:57:19 +00:00
Georg Brandl
8905bb10e0
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
2007-03-04 17:18:54 +00:00
Raymond Hettinger
0922d71604
SF #1615701 : make d.update(m) honor __getitem__() and keys() in dict subclasses
2007-02-07 20:08:22 +00:00
Georg Brandl
b9f4ad3a9a
Bug #1576657 : when setting a KeyError for a tuple key, make sure that
...
the tuple isn't used as the "exception arguments tuple".
2006-10-29 18:31:42 +00:00
Neal Norwitz
b902f4e401
Use absolute imports
2006-04-03 04:45:34 +00:00
Guido van Rossum
1968ad32cd
- Patch 1433928:
...
- The copy module now "copies" function objects (as atomic objects).
- dict.__getitem__ now looks for a __missing__ hook before raising
KeyError.
- Added a new type, defaultdict, to the collections module.
This uses the new __missing__ hook behavior added to dict (see above).
2006-02-25 22:38:04 +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