DefaultDict Tutorial

  • + 1 comment

    I really don't see the point of this thing. In most cases I though about I had to check if it was empty at some point anyway or if it was present inside the list so it's just adding overhead and you still need to check. Isn't it useless in most cases ?

    Plus in normal dict you can already use: d = dict() d.get(key, default_value) `