lisa-lab/pylearn2 — pull request #927 by dwf (2014-05-22 19:16:07+00:00)
Title: Added a .tag for models

Sort of similar to Theano's `.tag` attribute but just uses dictionaries. The top-level default is a `defaultdict` that instantiates empty dicts as default values an extension can say `model.tag[ext_name][ext_quantity]` immediately without instantiating `model.tag[ext_name]`.

`collections.defaultdict` is as old as Python 2.5 so we're safe on that front.