matplotlib/matplotlib — pull request #985 by ivanov (2012-07-03 06:07:10+00:00)
Title: support current and future FreeBSD releases

Also removed some unnecessary imports. This closes #225

This is an alternative to #982 which is more future-proof. As explain in the comments:

```py
# basedir is a dictionary keyed by sys.platform, and on most platforms it is
# set to ['/usr/local', '/usr']. Giving this defaultdict a factory that
# returns this default removes the need to update this code every time a new
# version of freebsd comes out, for example, provided that the default basedir
# remains sufficient on that platform
basedir = defaultdict(lambda: ['/usr/local', '/usr'], {
# execptions to the ['/usr/local', '/usr'] defaults
...
```

Implementation detail: I checked and `defaultdict` was introduced into collections at 2.5, so we're safe, since trunk no longer need to be 2.4 compatible.