title: While creating a Dictionary: TypeError: unhashable type: 'dict'
body: <p>I'm trying to script a simple <code>Character Generator</code> that I can use for Pen and Paper RPG's. I was thinking about storing all my information in a nested dictionary and saving it into a JSON file.</p>
  
  <p>However, while creating the following dictionary, I receive as error: </p>
  
  <pre><code>nhashable type: 'dict', focussing on {'cha': 1}}}
  </code></pre>
  
  <hr>
  
  <pre><code>core_phb = {
  'races': {
      'Human': {
          {'abilities': 'None'},
          {'alignment': 'Neutral'},
          {'size': 'Medium'},
          {'speed': 6},
          {'languages': 'Common'},
          {'ability_modifiers': {
              {'str': 1},
              {'dex': 1},
              {'con': 1},
              {'int': 1},
              {'wis': 1},
              {'cha': 1}}}
      },
      'Dwarf': {
          {'abilities': [
              'ability1',
              'ability2'
              ]},
          {'alignment': 'Lawful Good'},
          {'size': 'Medium'},
          {'speed': 5},
          {'languages': [
              'Common',
              'Dwarven'
              ]},
          {'ability_modifiers': [
              {'con': 2},
              {'wis': 1}
              ]}
      },
      'Elf': {
          {'abilities': [
              'ability1',
              'ability2'
              ]},
          {'alignment': 'Chaotic Good'},
          {'size': 'Medium'},
          {'speed': 6},
          {'languages': [
              'Common',
              'Elven'
              ]},
          {'ability_modifiers': [
              {'dex': 2},
              {'int': 1}
              ]}
      }
  },
  'classes': {
      {'Fighter': {}},
      {'Ranger': {}},
      {'Wizard': {}}
  },
  'ability_scores': [
      {'Str': 'str'},
      {'Dex': 'dex'},
      {'Con': 'con'},
      {'Int': 'int'},
      {'Wis': 'wis'},
      {'Cha': 'cha'}]
  }
  </code></pre>
  
  <p>I am simply trying to create the dictionary, not calling any keys from it.</p>
  
  <p>As I understand from <a href="https://stackoverflow.com/questions/13264511/typeerror-unhashable-type-dict">TypeError: unhashable type: &#39;dict&#39;</a> , I can use <code>frozenset()</code> to get keys.</p>
  
  <p>Is there a better way to do what I am trying to do?</p>