sajidanis / aima-python

Automatically exported from code.google.com/p/aima-python
0 stars 0 forks source link

DefaultDict could front-end the native 2.5 version defaultdict #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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