glwu/aima-python

DefaultDict could front-end the native 2.5 version defaultdict

GoogleCodeExporter opened this issue · 0 comments

The collections.defaultdict class:

http://docs.python.org/library/collections.html#collections.defaultdict

could be used for Python 2.5+ rather than the method in utils.py:228

import collections
try: 
   collections.defaultdict ## set builtin introduced in 2.5
except NameError:
  class DefaultDict(dict):
  .
  .
  .




Original issue reported on code.google.com by arocki...@gmail.com on 15 Sep 2009 at 3:00