scipy/scipy — pull request #249 by matthew-brett (2012-06-09 23:25:48+00:00)
Title: NF: allow OrderedDict as input to savemat

Thanks to ali-ebrahim for pointing out this problem.

Closes http://projects.scipy.org/scipy/ticket/1566

The commit changes the savemat behavior in that, an object that
implements 'keys', 'values' and 'items' would previously have been been
saved by considering the object as an object, and saving all fields in
the object's __dict__ attribute. This patch identifies this object as a
mapping and saves all key, value pairs like a dict. This will cause a
change in behavior only for objects implementing all of 'keys',
'values', 'items'.