jason kirtland added the comment:
I find the behavior surprising compared to dict and other containers, where
this is not an issue and weakrefs are not required in user code. I would not
be surprised, however, to have to wait for a gc.collect() to clean up my cycles
like I do for regular
New submission from jason kirtland :
repr of circular graphs of collections.OrderedDicts fails with 'RuntimeError:
maximum recursion depth exceeded while calling a Python object'.
>>> from collections import OrderedDict
>>> left, right = OrderedDict(), OrderedDict
New submission from jason kirtland :
Circular graphs of collections.OrderedDict are uncollectable due to the
presence of OrderedDict.__del__.
>>> from collections import OrderedDict
>>> import gc
>>> left, right = OrderedDict(), OrderedDict()
>>> left['
New submission from jason kirtland <[EMAIL PROTECTED]>:
The C implementation (only) of bisect does not invoke list subclass
methods when insorting. Code like this will not trigger the assert:
class Boom(list):
def insert(self, index, item):
assert False
bisect.insor
New submission from jason kirtland:
In 2.6a, seems like the __hash__ implementation and __eq__ must be
defined together, in the same class. See also #1549. Ensuring that a
__hash__ implementation isn't being pulled from a builtin type is
probably a sufficient check...?
>>> cla
New submission from jason kirtland:
Python 2.5.1 (r251:54863, May 23 2007, 16:25:53)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import defaultdict