defaultdict accepts any invoked calls, so you can create a new function that does not accept a parameter, and returns an object created with the desired parameter.
d = defaultdict(lambda: myobj(param1))
Another option is to use functools.partial, which creates a function with one (or more) predefined parameters:
import functools d = defaultdict(functools.partial(myobj, param1))
source share