How can I pre-allocate a dict?