Message 294482 - Python tracker
Another way to reproduce this problem: >>> import datetime >>> from collections import defaultdict as dd >>> d = dd(datetime.datetime.now) >>> d['foo'] Traceback (most recent call last): File "<stdin>", line 1, in <module> SystemError: <built-in method __missing__ of collections.defaultdict object at 0x7f072e55b3b8> returned NULL without setting an error This problem doesn't appear on Python 2.7, too.