title: Can you access a python dictionary key's value from a function in that dictionary?
body: <p>I know how to add a function to a python dict:</p>
  <pre><code>def burn(theName):
          return theName + ' is burning'
  
  kitchen = {'name': 'The Kitchen', 'burn_it': burn}
      
  print(kitchen['burn_it'](kitchen['name']))
  
  ### output: &quot;the Kitchen is burning&quot;
  </code></pre>
  <p>but is there any way to reference the dictionary's own 'name' value without having to name the dict itself specifically? To refer to the dictionary as itself?</p>
  <p>With other languages in mind I was thinking there might be something like</p>
  <pre><code>print(kitchen['burn_it'](__self__['name']))
  </code></pre>
  <p>or</p>
  <pre><code>print(kitchen['burn_it'](__this__['name']))
  </code></pre>
  <p>where the function could access the 'name' key of the dictionary it was inside.</p>
  <p>I have googled quite a bit but I keep finding people who want to do this:</p>
  <pre><code>kitchen = {'name': 'Kitchen', 'fullname': 'The ' + ['name']}
  </code></pre>
  <p>where they're trying to access the dictionary key before they've finished initialising it.</p>
  <p>TIA</p>