setdefault

Use cases for the 'setdefault' dict method

The addition of collections.defaultdict in Python 2.5 greatly reduced the need for dict's setdefault method. This question is for our collective education: What is setdefault still useful for, today in Python 2.6/2.7? What popular use cases of setdefault were superseded with collections.defaultdict? ...

Rails + ActiveScaffold -> set_default_options

I can't seem to set default options at the ApplicationController level. I can do it just fine at the Controller level, but I want to be able to set some defaults here. This is the code that I'm using (for example): ActiveScaffold.set_defaults do |config| config.update.link.label = "" config.list.per_page = 15 end Any help wo...