title: __getitem__, __setitem__ multiple keys
body: <p>I am trying to create a class that stores data in a local buffer as well as acts as an interface to a database. I've got following code:</p>
  <pre><code>class Table(object):    
      def __init__(self, tableName, **columnDict):
         self.tableName      = tableName
         self.columns        = {}
         self.types          = {}
         self.columns['id']  = []
         self.types['id']    = 'INT PRIMARY KEY NOT NULL'
         for name in columnDict:
             self.columns[name] = []
             self.types[name]    = columnDict[name]
  
      def updateBufferRow(self, index, updateDict):
         for key in updateDict:
             self.columns[key][index] = updateDict[key]
  
      def getBufferRow(self, index):
         row = {}
         for key in self.columns:
             row[key] = self.columns[key][index]
         return row
  
      def __getitem__(self, key, **args):
         &quot;&quot;&quot; Allows using self[key] method &quot;&quot;&quot;
         return self.getBufferRow(key)
  
      def __setitem__(self, key, value, **args):
         &quot;&quot;&quot; Allows using self[key] = value method &quot;&quot;&quot;
         self.updateBufferRow(key, value)
  </code></pre>
  <p>Here is how I initialize the table:</p>
  <pre><code>testTable = Table('BestTable', test = 'TestType', test2='INT')
  </code></pre>
  <p>It works as expected the only thing if I try:</p>
  <pre><code>testTable[0]['test'] = &quot;LALALA&quot;
  </code></pre>
  <p>It does nothing, on the other hand this updates rather than overwrites the table:</p>
  <pre><code>testTable[0] = {&quot;test&quot;: &quot;LALALA&quot;}
  </code></pre>
  <p>I know I have to rewrite updateBufferRow() and getBufferRow() methods, the only thing I am not quite sure is how to get multiple keys using _<em>getitem</em>_ and _<em>setitem</em>_ methods.</p>