title: pymysql - name of default cursorclass
body: <p>This is probably a stupid question but I cannot find the information in the documentation for pymysql. What is the pymysql default cursorclass? When I do not specify a cursor class on connection to the database my queries return a list for each row in the response. </p>
  
  <p>When I specify pymysql.cursors.DictCursor I get a dictionary response. I would like to be able to change between them for different connections within a script. </p>
  
  <p>I've written a little function with a context manager to yield the cursor but it requires me to specify the name of the cursorclass each time. I know I can get around this, but knowing the name of the default cursorclass would be nice.  </p>
  
  <pre><code>from contextlib import contextmanager
  import pymysql
  
  @contextmanager                                                                                                                                                                                                                               
  def openDb(host=DB_HOST, database=DB_DATABASE,                                                                                                                                                                                     
             user=DB_USER, cursor=DB_CURSOR):                                                                                                                                                                                        
      """                                                                                                                                                                                                                                       
      Simple context manager for opening a db connection                                                                                                                                                                                        
      """                                                                                                                                                                                                                                       
      with pymysql.connect(host=host, database=database, user=user,                                                                                                                                                                             
                           cursorclass=cursor) as cur:                                                                                                                                                                                          
          yield cur   
  </code></pre>
  
  <p>I could probably write this as:</p>
  
  <pre><code>@contextmanager                                                                                                                                                                                                                               
  def openDb(host=DB_HOST, database=DB_DATABASE,                                                                                                                                                                                     
             user=DB_USER, cursor=None):                                                                                                                                                                                        
      """                                                                                                                                                                                                                                       
      Simple context manager for opening a db connection                                                                                                                                                                                        
      """
      if cursor:                                                                                                                                                                                                                                   
          with pymysql.connect(host=host, database=database, user=user,                                                                                                                                                                             
                               cursorclass=cursor) as cur:                                                                                                                                                                                          
              yield cur
      else:
          with pymysql.connect(host=host, database=database, user=user) as cur:                                                                                                                                                                                                                                                                                                                                      
              yield cur  
  </code></pre>
  
  <p>and let it default to whatever the default cursorclass is, but I would prefer to be explicit.  </p>